Skip to content

Commit

Permalink
Fix issue with WYSIWYG editors magento/adobe-stock-integration/issues…
Browse files Browse the repository at this point in the history
  • Loading branch information
Nazar65 committed Nov 11, 2019
1 parent 3efbe15 commit f229056
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions lib/web/mage/adminhtml/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,12 @@ define([
var windowId = this.windowId,
content = '<div class="popup-window" id="' + windowId + '"></div>',
self = this;

if (this.modalLoaded === true &&
options &&
self.targetElementId &&
self.targetElementId === options.targetElementId
) {
if (typeof options.closed !== 'undefined') {

if (this.modalLoaded === true
|| (self.targetElementId
&& self.targetElementId === options.targetElementId)) {

if (options && typeof options.closed !== 'undefined') {
this.modal.modal('option', 'closed', options.closed);
}
this.modal.modal('openModal');
Expand Down Expand Up @@ -89,9 +88,9 @@ define([
}).done(function (data) {
self.modal.html(data).trigger('contentUpdated');
self.modalLoaded = true;
self.targetElementId = options.targetElementId;
options ? self.targetElementId = options.targetElementId : '';
});
},
},

/**
* Close dialog.
Expand Down

0 comments on commit f229056

Please sign in to comment.