Fix the alt key opening the menu in KBM input fields on Firefox (#1332)
This commit is contained in:
parent
0ba1427775
commit
7177694419
@ -46,7 +46,8 @@ class KeyboardMouseInputField extends EventDispatcher {
|
|||||||
this._keySupported = keySupported;
|
this._keySupported = keySupported;
|
||||||
this.setInput(key, modifiers);
|
this.setInput(key, modifiers);
|
||||||
const events = [
|
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) {
|
if (mouseModifiersSupported && this._mouseButton !== null) {
|
||||||
events.push(
|
events.push(
|
||||||
@ -152,6 +153,10 @@ class KeyboardMouseInputField extends EventDispatcher {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_onModifierKeyUp(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
_onMouseButtonMouseDown(e) {
|
_onMouseButtonMouseDown(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this._addModifiers(DocumentUtil.getActiveButtons(e));
|
this._addModifiers(DocumentUtil.getActiveButtons(e));
|
||||||
|
Loading…
Reference in New Issue
Block a user