From 5ef49f9b8e3a3c93da57ab40049d56395cdb217f Mon Sep 17 00:00:00 2001 From: djmaze Date: Wed, 21 Jul 2021 14:14:31 +0200 Subject: [PATCH] Bugfix: shortcuts stop working https://github.com/the-djmaze/snappymail/issues/62#issuecomment-810921656 --- dev/Common/Globals.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/dev/Common/Globals.js b/dev/Common/Globals.js index a2653cfc3..00e6eee77 100644 --- a/dev/Common/Globals.js +++ b/dev/Common/Globals.js @@ -40,19 +40,18 @@ export const keyScope = (()=>{ keyScope(keyScopeFake); } }); - return ko.computed({ - read: () => keyScopeFake, - write: value => { + return value => { + if (value) { if (Scope.Menu !== value) { keyScopeFake = value; if (dropdownVisibility()) { value = Scope.Menu; } } - keyScopeReal(value); + shortcuts.setScope(value); + } else { + return keyScopeFake; } - }); + }; })(); - -keyScopeReal.subscribe(value => shortcuts.setScope(value));