diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/js/controls.js | 2 | ||||
-rw-r--r-- | src/js/listeners.js | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/js/controls.js b/src/js/controls.js index 4ee4c572..1abb8263 100644 --- a/src/js/controls.js +++ b/src/js/controls.js @@ -448,6 +448,8 @@ const controls = { }, // Bind keyboard shortcuts for a menu item + // We have to bind to keyup otherwise Firefox triggers a click when a keydown event handler shifts focus + // https://bugzilla.mozilla.org/show_bug.cgi?id=1220143 bindMenuItemShortcuts(menuItem, type) { // Handle space or -> to open menu on( diff --git a/src/js/listeners.js b/src/js/listeners.js index 80c2e630..881393ba 100644 --- a/src/js/listeners.js +++ b/src/js/listeners.js @@ -6,7 +6,14 @@ import controls from './controls'; import ui from './ui'; import { repaint } from './utils/animation'; import browser from './utils/browser'; -import { getElement, getElements, hasClass, matches, toggleClass, toggleHidden } from './utils/elements'; +import { + getElement, + getElements, + hasClass, + matches, + toggleClass, + toggleHidden, +} from './utils/elements'; import { on, once, toggleListener, triggerEvent } from './utils/events'; import is from './utils/is'; @@ -690,6 +697,8 @@ class Listeners { }); // Settings menu - keyboard toggle + // We have to bind to keyup otherwise Firefox triggers a click when a keydown event handler shifts focus + // https://bugzilla.mozilla.org/show_bug.cgi?id=1220143 this.bind( player.elements.buttons.settings, 'keyup', |