From 74369b7bf4811b31535c1da5803d485815eb5891 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Thu, 30 Jan 2025 16:01:36 +0100 Subject: [PATCH] Modal.js: Prevent unnecessarily `onKeyDown` call --- 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 4eb452758..68df55cac 100644 --- a/public/js/icinga/behavior/modal.js +++ b/public/js/icinga/behavior/modal.js @@ -24,7 +24,7 @@ this.on('click', '[data-icinga-modal]', this.onModalToggleClick, this); this.on('mousedown', '#layout > #modal', this.onModalLeave, this); this.on('click', '.modal-header > button', this.onModalClose, this); - this.on('keydown', this.onKeyDown, this); + this.on('keydown', '#layout > #modal.active', this.onKeyDown, this); }; Modal.prototype = new Icinga.EventListener();