mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03: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);
|
super('Popups' + name, ViewType.Popup);
|
||||||
this.keyScope.scope = name;
|
this.keyScope.scope = name;
|
||||||
this.modalVisibility = ko.observable(false).extend({ rateLimit: 0 });
|
this.modalVisibility = ko.observable(false).extend({ rateLimit: 0 });
|
||||||
|
|
||||||
this.onClose = this.onClose.debounce(200);
|
|
||||||
shortcuts.add('escape,close', '', name, () => {
|
shortcuts.add('escape,close', '', name, () => {
|
||||||
if (this.modalVisibility() && this.onClose()) {
|
if (this.modalVisibility() && this.onClose()) {
|
||||||
this.closeCommand();
|
this.closeCommand();
|
||||||
|
|
@ -71,9 +69,9 @@ export class AbstractViewPopup extends AbstractView
|
||||||
shortcuts.add('backspace', '', name, inFocus());
|
shortcuts.add('backspace', '', name, inFocus());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Happens when user hits Escape key
|
// Happens when user hits Escape or Close key
|
||||||
onClose() {
|
onClose() {
|
||||||
return true;
|
return true; // false to prevent closing
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue