mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-12-30 19:41:46 +08:00
Bugfix: Popup Escape/Close key failed
This commit is contained in:
parent
b82d26b71b
commit
65a3b9e4c7
1 changed files with 2 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue