fix hotkeys in popup

This commit is contained in:
siikamiika 2020-03-01 19:02:43 +02:00
parent a46a84ee15
commit 314c567a47

View File

@ -40,7 +40,8 @@ class DisplayFloat extends Display {
return true; return true;
} }
return false; return false;
}] }],
...this._onKeyDownHandlers
]); ]);
this._windowMessageHandlers = new Map([ this._windowMessageHandlers = new Map([
@ -114,18 +115,6 @@ class DisplayFloat extends Display {
} }
} }
onKeyDown(e) {
const key = Display.getKeyFromEvent(e);
const handler = this._onKeyDownHandlers.get(key);
if (typeof handler === 'function') {
if (handler(e)) {
e.preventDefault();
return true;
}
}
return super.onKeyDown(e);
}
async getMessageToken() { async getMessageToken() {
// this._messageTokenPromise is used to ensure that only one call to apiGetMessageToken is made. // this._messageTokenPromise is used to ensure that only one call to apiGetMessageToken is made.
if (this._messageTokenPromise === null) { if (this._messageTokenPromise === null) {