Skip to content

Commit

Permalink
WYSIWYG Image-Popup is not working correctly with multipleEditors
Browse files Browse the repository at this point in the history
  • Loading branch information
Nazar65 committed Apr 5, 2019
1 parent 0d99fa8 commit 8611d14
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/web/mage/adminhtml/wysiwyg/tiny_mce/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,16 @@ define([
* @param {Object} o
*/
openFileBrowser: function (o) {
var targetElementID = tinymce.activeEditor.getElement().getAttribute('id');
var originId = this.id;
this.initialize(targetElementID, this.config);

var typeTitle,
storeId = this.config['store_id'] !== null ? this.config['store_id'] : 0,
frameDialog = jQuery(o.win.frameElement).parents('[role="dialog"]'),
wUrl = this.config['files_browser_window_url'] +
'target_element_id/' + this.id + '/' +
'store/' + storeId + '/';
'target_element_id/' + this.id + '/' +
'store/' + storeId + '/';

this.mediaBrowserOpener = o.win;
this.mediaBrowserTargetElementId = o.field;
Expand All @@ -255,6 +259,8 @@ define([
typeTitle = this.translate('Insert File...');
}

this.initialize(originId, this.config);

frameDialog.hide();
jQuery('#mceModalBlocker').hide();

Expand Down

0 comments on commit 8611d14

Please sign in to comment.