Skip to content

Commit

Permalink
menu: up arrow puts focus back in search box, fix #543
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Vogt committed Dec 1, 2023
1 parent 4d44b5f commit 7144de9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/modules/menu.js
Expand Up @@ -184,7 +184,12 @@ PassFF.Menu = (function () {
}
menuState['items'] = PassFF.Pass.rootItems;
createMenuList();
} else if (!event.shiftKey && event.key != 'Control' && event.keyCode != 40 && event.keyCode != 38) {
} else if (
!event.shiftKey
&& event.key != 'Control'
&& event.keyCode != 40
&& (event.keyCode != 38 || listElm.selectedIndex === 0)
) {
/* NOT: SHIFT, CTRL, DOWN ARROW, UP ARROW */
document.getElementById('passff-search-box').focus();
}
Expand Down

0 comments on commit 7144de9

Please sign in to comment.