From 532ed027f7d35a22933bd0017d2a40a38c5c7031 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Mon, 28 Mar 2022 19:00:22 +0200 Subject: [PATCH] modal.js: Register onModalClose event also on `.modal-cancel` selector --- 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 a575e01ea..d58d903a3 100644 --- a/public/js/icinga/behavior/modal.js +++ b/public/js/icinga/behavior/modal.js @@ -23,7 +23,7 @@ this.on('change', '#modal form input.autosubmit', this.onFormAutoSubmit, this); 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('click', '.modal-header > button, .modal-cancel', this.onModalClose, this); this.on('keydown', this.onKeyDown, this); };