mirror of
https://github.com/fly-apps/live_beats.git
synced 2024-11-28 10:41:01 +00:00
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:
parent
d35554ee0e
commit
a19a6091e6
1 changed files with 2 additions and 0 deletions
|
@ -87,6 +87,8 @@ Hooks.Menu = {
|
||||||
let menuItems = this.menuItems()
|
let menuItems = this.menuItems()
|
||||||
this.deactivate(menuItems)
|
this.deactivate(menuItems)
|
||||||
this.activate(menuItems.indexOf(this.activeItem) - 1, menuItems.length - 1)
|
this.activate(menuItems.indexOf(this.activeItem) - 1, menuItems.length - 1)
|
||||||
|
} else if (e.key == "Tab") {
|
||||||
|
e.preventDefault()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue