Skip to content

Commit

Permalink
fix: enable keyboard controls on menu items
Browse files Browse the repository at this point in the history
  • Loading branch information
usmanonazim committed Jun 21, 2024
1 parent 6b468dd commit 56ff9a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/menu/menu-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class MenuItem extends ClickableComponent {
* @listens keydown
*/
handleKeyDown(event) {
if (['Tab', 'Escape', 'ArrowUp', 'ArrowLeft', 'ArrowRight', 'ArrowDown'].includes(event.key)) {
if (!['Tab', 'Escape', 'ArrowUp', 'ArrowLeft', 'ArrowRight', 'ArrowDown'].includes(event.key)) {
// Pass keydown handling up for unused keys
super.handleKeyDown(event);
}
Expand Down

0 comments on commit 56ff9a6

Please sign in to comment.