fix hotkeys in popup
This commit is contained in:
parent
a46a84ee15
commit
314c567a47
@ -40,7 +40,8 @@ class DisplayFloat extends Display {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}]
|
||||
}],
|
||||
...this._onKeyDownHandlers
|
||||
]);
|
||||
|
||||
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() {
|
||||
// this._messageTokenPromise is used to ensure that only one call to apiGetMessageToken is made.
|
||||
if (this._messageTokenPromise === null) {
|
||||
|
Loading…
Reference in New Issue
Block a user