From 7790a72efa366d150bed29a47c0ed2726e682da4 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 4 Mar 2021 14:28:18 +0100 Subject: [PATCH] js: Only close a modal if an ESC press is not handled otherwise --- public/js/icinga/behavior/modal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/icinga/behavior/modal.js b/public/js/icinga/behavior/modal.js index f08c87cfc..a60a42566 100644 --- a/public/js/icinga/behavior/modal.js +++ b/public/js/icinga/behavior/modal.js @@ -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')); } };