From c2b475585fbae9a24e38666b7c3a11ec77615f20 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 0bd849b44..6ad82a5c5 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); };