Skip to content

Commit

Permalink
Backport of MAGETWO-54401 for Magento 2.1 - Unable to click "Insert i…
Browse files Browse the repository at this point in the history
…mage" twice
  • Loading branch information
hostep committed Apr 20, 2017
1 parent 87670a7 commit 5bab5e9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/web/mage/adminhtml/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ define([
"jquery/jstree/jquery.jstree",
"mage/mage"
], function($, tinyMCEm, prompt, confirm, alert){

MediabrowserUtility = {
windowId: 'modal_dialog_message',
getMaxZIndex: function() {
Expand All @@ -31,12 +31,14 @@ define([
},
openDialog: function(url, width, height, title, options) {
var windowId = this.windowId,
content = '<div class="popup-window magento-message" "id="' + windowId + '"></div>',
content = '<div class="popup-window magento-message" id="' + windowId + '"></div>',
self = this;

if (this.modal) {
this.modal.html($(content).html());
this.modal.modal('option', 'closed', options.closed);
if (options && typeof options.closed !== 'undefined') {
this.modal.modal('option', 'closed', options.closed);
}
} else {
this.modal = $(content).modal($.extend({
title: title || 'Insert File...',
Expand Down

0 comments on commit 5bab5e9

Please sign in to comment.