Skip to content

Commit 24c9996

Browse files
author
Oleksii Korshenko
authored
MAGETWO-67620: Backport of MAGETWO-54401 for Magento 2.1 - Unable to click "Insert image" twice #9332
2 parents b3d9e51 + f982a6f commit 24c9996

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/web/mage/adminhtml/browser.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ define([
1414
"jquery/jstree/jquery.jstree",
1515
"mage/mage"
1616
], function($, tinyMCEm, prompt, confirm, alert){
17-
17+
1818
MediabrowserUtility = {
1919
windowId: 'modal_dialog_message',
2020
getMaxZIndex: function() {
@@ -31,12 +31,14 @@ define([
3131
},
3232
openDialog: function(url, width, height, title, options) {
3333
var windowId = this.windowId,
34-
content = '<div class="popup-window magento-message" "id="' + windowId + '"></div>',
34+
content = '<div class="popup-window magento-message" id="' + windowId + '"></div>',
3535
self = this;
3636

3737
if (this.modal) {
3838
this.modal.html($(content).html());
39-
this.modal.modal('option', 'closed', options.closed);
39+
if (options && typeof options.closed !== 'undefined') {
40+
this.modal.modal('option', 'closed', options.closed);
41+
}
4042
} else {
4143
this.modal = $(content).modal($.extend({
4244
title: title || 'Insert File...',

0 commit comments

Comments
 (0)