mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 05:29:20 +03:00
Drop cancelCommand in favor of closeCommand and improve AbstractViewPopup handling
This commit is contained in:
parent
06b5b83588
commit
2edd55f01f
36 changed files with 82 additions and 118 deletions
|
|
@ -259,8 +259,6 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
]
|
||||
});
|
||||
|
||||
this.bDisabeCloseOnEsc = true;
|
||||
|
||||
this.tryToClosePopup = this.tryToClosePopup.debounce(200);
|
||||
|
||||
this.iTimer = 0;
|
||||
|
|
@ -643,6 +641,11 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
}
|
||||
}
|
||||
|
||||
onClose() {
|
||||
this.skipCommand();
|
||||
return false;
|
||||
}
|
||||
|
||||
skipCommand() {
|
||||
this.bSkipNextHide = true;
|
||||
|
||||
|
|
@ -1330,10 +1333,6 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
shortcuts.add('contextmenu', '', ScopeCompose, e => this.popupMenu(e));
|
||||
shortcuts.add('m', 'meta', ScopeCompose, e => this.popupMenu(e));
|
||||
|
||||
shortcuts.add('escape,close', '', ScopeCompose, () => {
|
||||
this.skipCommand();
|
||||
return false;
|
||||
});
|
||||
shortcuts.add('arrowdown', 'meta', ScopeCompose, () => {
|
||||
this.skipCommand();
|
||||
return false;
|
||||
|
|
@ -1360,7 +1359,7 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
});
|
||||
|
||||
shortcuts.add('escape,close', 'shift', ScopeCompose, () => {
|
||||
this.modalVisibility() && this.tryToClosePopup();
|
||||
this.tryToClosePopup();
|
||||
return false;
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue