summaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/keyboard-mouse-input-field.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-01-30 14:15:27 -0500
committerGitHub <noreply@github.com>2021-01-30 14:15:27 -0500
commit7177694419f79986140a81cc5d7d259741e2b848 (patch)
treedcb25b3874ddfbc8f9f043b9ec4bb8edd673f8b7 /ext/bg/js/settings/keyboard-mouse-input-field.js
parent0ba1427775f0e5e746c11dde8b22e827a60745de (diff)
Fix the alt key opening the menu in KBM input fields on Firefox (#1332)
Diffstat (limited to 'ext/bg/js/settings/keyboard-mouse-input-field.js')
-rw-r--r--ext/bg/js/settings/keyboard-mouse-input-field.js7
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));