Bugfix: shortcuts stop working

https://github.com/the-djmaze/snappymail/issues/62#issuecomment-810921656
This commit is contained in:
djmaze 2021-07-21 14:14:31 +02:00
parent 319e30265b
commit 5ef49f9b8e

View file

@ -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));