From 65a3b9e4c74b5f4e72cabfe0a0a8fcfa275751f1 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Fri, 25 Feb 2022 13:13:09 +0100 Subject: [PATCH] Bugfix: Popup Escape/Close key failed --- dev/Knoin/AbstractViews.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dev/Knoin/AbstractViews.js b/dev/Knoin/AbstractViews.js index 4f22d4c65..fdf39cb43 100644 --- a/dev/Knoin/AbstractViews.js +++ b/dev/Knoin/AbstractViews.js @@ -59,8 +59,6 @@ export class AbstractViewPopup extends AbstractView super('Popups' + name, ViewType.Popup); this.keyScope.scope = name; this.modalVisibility = ko.observable(false).extend({ rateLimit: 0 }); - - this.onClose = this.onClose.debounce(200); shortcuts.add('escape,close', '', name, () => { if (this.modalVisibility() && this.onClose()) { this.closeCommand(); @@ -71,9 +69,9 @@ export class AbstractViewPopup extends AbstractView shortcuts.add('backspace', '', name, inFocus()); } - // Happens when user hits Escape key + // Happens when user hits Escape or Close key onClose() { - return true; + return true; // false to prevent closing } /*