Cleanup closeCommand & cancelCommand because both are defined for popups

This commit is contained in:
djmaze 2021-07-16 09:11:10 +02:00
parent c46e190a3a
commit d69743cee5
5 changed files with 9 additions and 9 deletions

View file

@ -38,9 +38,6 @@ class AbstractView {
keyScope(this.sCurrentScope);
}
cancelCommand() {}
closeCommand() {}
querySelector(selectors) {
return this.viewModelDom.querySelector(selectors);
}
@ -68,7 +65,10 @@ export class AbstractViewPopup extends AbstractView
this.sDefaultScope = Scope[name];
}
}
/*
cancelCommand() {}
closeCommand() {}
*/
/**
* @returns {void}
*/
@ -76,7 +76,7 @@ export class AbstractViewPopup extends AbstractView
addEventListener('keydown', event => {
if (event && this.modalVisibility && this.modalVisibility()) {
if (!this.bDisabeCloseOnEsc && 'Escape' == event.key) {
this.cancelCommand && this.cancelCommand();
this.cancelCommand();
return false;
} else if ('Backspace' == event.key && !inFocus()) {
return false;