When a dropdown is open, block Tab to avoid navigating away.

Under Windows, dropdowns cannot be tabbed off of. They are only closed by either selecting an item or pressing Escape.
This commit is contained in:
Nolan Darilek 2021-11-22 12:55:01 -06:00
parent d35554ee0e
commit a19a6091e6

View file

@ -87,6 +87,8 @@ Hooks.Menu = {
let menuItems = this.menuItems()
this.deactivate(menuItems)
this.activate(menuItems.indexOf(this.activeItem) - 1, menuItems.length - 1)
} else if (e.key == "Tab") {
e.preventDefault()
}
}
}