From 314c567a47cd07dee7d6cda785257b2109afcad5 Mon Sep 17 00:00:00 2001 From: siikamiika Date: Sun, 1 Mar 2020 19:02:43 +0200 Subject: fix hotkeys in popup --- ext/fg/js/float.js | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'ext') diff --git a/ext/fg/js/float.js b/ext/fg/js/float.js index aef0367e..bc459d23 100644 --- a/ext/fg/js/float.js +++ b/ext/fg/js/float.js @@ -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) { -- cgit v1.2.3