diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-01-30 14:15:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-30 14:15:27 -0500 |
commit | 7177694419f79986140a81cc5d7d259741e2b848 (patch) | |
tree | dcb25b3874ddfbc8f9f043b9ec4bb8edd673f8b7 /ext/bg/js/settings | |
parent | 0ba1427775f0e5e746c11dde8b22e827a60745de (diff) |
Fix the alt key opening the menu in KBM input fields on Firefox (#1332)
Diffstat (limited to 'ext/bg/js/settings')
-rw-r--r-- | ext/bg/js/settings/keyboard-mouse-input-field.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/bg/js/settings/keyboard-mouse-input-field.js b/ext/bg/js/settings/keyboard-mouse-input-field.js index 94709313..09477519 100644 --- a/ext/bg/js/settings/keyboard-mouse-input-field.js +++ b/ext/bg/js/settings/keyboard-mouse-input-field.js @@ -46,7 +46,8 @@ class KeyboardMouseInputField extends EventDispatcher { this._keySupported = keySupported; this.setInput(key, modifiers); const events = [ - [this._inputNode, 'keydown', this._onModifierKeyDown.bind(this), false] + [this._inputNode, 'keydown', this._onModifierKeyDown.bind(this), false], + [this._inputNode, 'keyup', this._onModifierKeyUp.bind(this), false] ]; if (mouseModifiersSupported && this._mouseButton !== null) { events.push( @@ -152,6 +153,10 @@ class KeyboardMouseInputField extends EventDispatcher { } } + _onModifierKeyUp(e) { + e.preventDefault(); + } + _onMouseButtonMouseDown(e) { e.preventDefault(); this._addModifiers(DocumentUtil.getActiveButtons(e)); |