diff --git a/plugins/CoreHome/javascripts/corehome.js b/plugins/CoreHome/javascripts/corehome.js index 70d278ece4e6ad26e7c41ca7f2e7111916f3faee..41692c8ae3fbff47759d140079d7aee0e5e59bdb 100755 --- a/plugins/CoreHome/javascripts/corehome.js +++ b/plugins/CoreHome/javascripts/corehome.js @@ -192,4 +192,13 @@ $( document ).ready(function() { $('a[name="main"]').attr('tabindex', -1).focus(); $(window).scrollTo($('a[name="main"]')); }); + + // Only use the "outline" CSS property on focus, when the keyboard is being used (do not show the outline when clicking with the mouse) + $("body").on("mousedown", "*", function(e) { + if (($(this).is(":focus") || $(this).is(e.target)) && $(this).css("outline-style") == "none") { + $(this).css("outline", "none").on("blur", function() { + $(this).off("blur").css("outline", ""); + }); + } + }); }); \ No newline at end of file diff --git a/plugins/CoreHome/stylesheets/layout.less b/plugins/CoreHome/stylesheets/layout.less index 0fb5e5677efc52abcd64a6ab67ae80a6ea635a7b..8fa1e9e7e183fd72a0c34f03cc24e66e9f24cdea 100644 --- a/plugins/CoreHome/stylesheets/layout.less +++ b/plugins/CoreHome/stylesheets/layout.less @@ -1,13 +1,7 @@ body { :focus { - outline: 0; - -moz-box-shadow: inset 0 0 0 2px @theme-color-background-highContrast; - -webkit-box-shadow: inset 0 0 0 2px @theme-color-background-highContrast; - box-shadow: inset 0 0 0 2px @theme-color-background-highContrast; - border-radius: 2px; - -moz-border-radius:2px; - -webkit-border-radius:2px; - } + outline:@theme-color-background-highContrast solid 2px; + } } #header {