mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 11:39:21 +03:00
Small refactoring (popup key scope optimization)
This commit is contained in:
parent
77cdc4690b
commit
a96e1d80c3
22 changed files with 226 additions and 254 deletions
|
|
@ -60,6 +60,7 @@ function PopupsPluginViewModel()
|
|||
}, this.hasConfiguration);
|
||||
|
||||
this.bDisabeCloseOnEsc = true;
|
||||
this.sDefaultKeyScope = Enums.KeyState.All;
|
||||
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
|
@ -127,11 +128,11 @@ PopupsPluginViewModel.prototype.tryToClosePopup = function ()
|
|||
|
||||
PopupsPluginViewModel.prototype.onBuild = function ()
|
||||
{
|
||||
key('esc', _.bind(function () {
|
||||
key('esc', Enums.KeyState.All, _.bind(function () {
|
||||
if (this.modalVisibility())
|
||||
{
|
||||
this.tryToClosePopup();
|
||||
return false;
|
||||
}
|
||||
}));
|
||||
}, this));
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue