Skip to content

Commit 2c1a4a7

Browse files
author
Stanislav Idolov
authored
ENGCOM-3306: fixed issue #18458 : Alert widget gets close when click anywhere on screen #18576 #18865
2 parents 280add3 + f1108dc commit 2c1a4a7

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

app/code/Magento/Ui/view/base/web/js/modal/modal-component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ define([
9393
* @returns {Object} Chainable.
9494
*/
9595
initModalEvents: function () {
96-
this.options.keyEventHandlers.escapeKey = this.options.outerClickHandler = this[this.onCancel].bind(this);
96+
this.options.keyEventHandlers.escapeKey = this[this.onCancel].bind(this);
9797

9898
return this;
9999
},

app/code/Magento/Ui/view/base/web/js/modal/modal.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,7 @@ define([
424424
* Creates overlay, append it to wrapper, set previous click event on overlay.
425425
*/
426426
_createOverlay: function () {
427-
var events,
428-
outerClickHandler = this.options.outerClickHandler || this.closeModal;
427+
var events;
429428

430429
this.overlay = $('.' + this.options.overlayClass);
431430

@@ -437,7 +436,6 @@ define([
437436
}
438437
events = $._data(this.overlay.get(0), 'events');
439438
events ? this.prevOverlayHandler = events.click[0].handler : false;
440-
this.options.clickableOverlay ? this.overlay.unbind().on('click', outerClickHandler) : false;
441439
},
442440

443441
/**

0 commit comments

Comments
 (0)