js: Only close a modal if an ESC press is not handled otherwise

This commit is contained in:
Johannes Meyer 2021-03-04 14:28:18 +01:00
parent 59e6ec4035
commit 7790a72efa

View File

@ -148,7 +148,7 @@
Modal.prototype.onKeyDown = function(event) {
var _this = event.data.self;
if (event.which === 27) {
if (! event.isDefaultPrevented() && event.key === 'Escape') {
_this.hide(_this.$layout.children('#modal'));
}
};