Fix closing the action confirmation modal window on top close icon (#5176)

* Fix closing the action confirmation modal window on top close icon

* Update CHANGELOG_DEV.md

Co-authored-by: Lucas Bartholemy <luke-@users.noreply.github.com>
This commit is contained in:
Yuriy Bakhtin 2021-07-19 12:08:58 +03:00 committed by GitHub
parent c8e80fb76c
commit 8043eb3e81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -2,6 +2,7 @@
------------------ ------------------
- Fix #5174: Tour module crashes with enabled tags field - 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) 1.9.0-beta.2 (July 14, 2021)

View File

@ -526,14 +526,13 @@ humhub.module('ui.modal', function (module, require, $) {
//Init handler //Init handler
var that = this; var that = this;
if (cfg['handler']) { if (cfg['handler']) {
$confirmButton.one('click', function (evt) { $confirmButton.one('click', function () {
that.clear(); that.clear();
cfg['handler'](true); cfg['handler'](true);
}); });
}
if (cfg['handler']) { var $closeButtonsIcons = this.$.find('[data-modal-close]');
$cancelButton.one('click', function (evt) { $closeButtonsIcons.one('click', function () {
that.clear(); that.clear();
cfg['handler'](false); cfg['handler'](false);
}); });