forked from extern/the-glorious-startpage
web menu: disable tabbings on webmenu and ignore tab on webmenu searchbox
This commit is contained in:
parent
13b0c7c816
commit
44a903e59b
@ -42,6 +42,7 @@ const populateWebMenu = () => {
|
||||
var aWebLink = document.createElement('a');
|
||||
aWebLink.className = 'webMenuLink';
|
||||
aWebLink.href = url;
|
||||
aWebLink.tabIndex = '-1';
|
||||
|
||||
// Create an outer div, child of li
|
||||
let webItemDiv = document.createElement('div')
|
||||
@ -319,6 +320,8 @@ webMenuSearchBox.onkeydown = (event) => {
|
||||
if ((event.key === 'ArrowRight') || (event.key === 'ArrowDown') ||
|
||||
(event.key === 'ArrowLeft') || (event.key === 'ArrowUp')) return;
|
||||
|
||||
if (event.key === 'Tab') return;
|
||||
|
||||
if (event.key === 'Enter' && webItemFocus) {
|
||||
// Run the focused li's callback
|
||||
webItemFocus.callback();
|
||||
|
Loading…
Reference in New Issue
Block a user