diff --git a/CHANGELOG_DEV.md b/CHANGELOG_DEV.md index c2d8e47835..ddab1e7f8d 100644 --- a/CHANGELOG_DEV.md +++ b/CHANGELOG_DEV.md @@ -2,6 +2,7 @@ ------------------ - Fix #5174: Tour module crashes with enabled tags field +- Fix #5176: Closing the action confirmation modal window on top close icon 1.9.0-beta.2 (July 14, 2021) diff --git a/static/js/humhub/humhub.ui.modal.js b/static/js/humhub/humhub.ui.modal.js index 2ecb4d1bde..18eb17a9c4 100644 --- a/static/js/humhub/humhub.ui.modal.js +++ b/static/js/humhub/humhub.ui.modal.js @@ -526,14 +526,13 @@ humhub.module('ui.modal', function (module, require, $) { //Init handler var that = this; if (cfg['handler']) { - $confirmButton.one('click', function (evt) { + $confirmButton.one('click', function () { that.clear(); cfg['handler'](true); }); - } - if (cfg['handler']) { - $cancelButton.one('click', function (evt) { + var $closeButtonsIcons = this.$.find('[data-modal-close]'); + $closeButtonsIcons.one('click', function () { that.clear(); cfg['handler'](false); });