Skip to content

Commit f784541

Browse files
committed
remove google chrome frame
1 parent a15ed37 commit f784541

File tree

1 file changed

+9
-0
lines changed
  • lib/modules/navigations-widgets/public/js

1 file changed

+9
-0
lines changed

lib/modules/navigations-widgets/public/js/lean.js

+9
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@ apos.utils.widgetPlayers['navigations'] = function(el, data, options) {
5959
}
6060
}
6161

62+
// Remove the ugly focus ring on google chrome but keep it if user really uses keyboard
63+
function handleFirstTab(e) {
64+
if (e.keyCode === 9) { // the "I am a keyboard user" key
65+
document.body.classList.add('user-is-tabbing');
66+
window.removeEventListener('keydown', handleFirstTab);
67+
}
68+
}
69+
window.addEventListener('keydown', handleFirstTab);
70+
6271
// Anchor jump with scroll anchors
6372
var anchorJumpLinks = document.querySelectorAll('.anchor-jump[href^="#"]');
6473
for (var i = 0; i < anchorJumpLinks.length; i++) {

0 commit comments

Comments
 (0)