Skip to content

Commit 4c96d0e

Browse files
committed
MC-3309: Build stabilization
Prevent calling _setActive multiple times on active modal
1 parent 6b6fe78 commit 4c96d0e

File tree

1 file changed

+7
-0
lines changed
  • app/code/Magento/Ui/view/base/web/js/modal

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,12 @@ define([
340340
var zIndex = this.modal.zIndex(),
341341
baseIndex = zIndex + this._getVisibleCount();
342342

343+
if (this.modal.data('active')) {
344+
return;
345+
}
346+
347+
this.modal.data('active', true);
348+
343349
this.overlay.zIndex(++baseIndex);
344350
this.prevOverlayIndex = this.overlay.zIndex();
345351
this.modal.zIndex(this.overlay.zIndex() + 1);
@@ -354,6 +360,7 @@ define([
354360
*/
355361
_unsetActive: function () {
356362
this.modal.removeAttr('style');
363+
this.modal.data('active', false);
357364

358365
if (this.overlay) {
359366
// In cases when one modal is closed but there is another modal open (e.g. admin notifications)

0 commit comments

Comments
 (0)