Skip to content

Commit 8b90f2b

Browse files
authored
ENGCOM-4682: WYSIWYG Image-Popup is not working correctly with multipleEditors #22174
2 parents ee249de + d070a2d commit 8b90f2b

File tree

1 file changed

+14
-4
lines changed
  • lib/web/mage/adminhtml/wysiwyg/tiny_mce

1 file changed

+14
-4
lines changed

lib/web/mage/adminhtml/wysiwyg/tiny_mce/setup.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,10 +238,18 @@ define([
238238
* @param {Object} o
239239
*/
240240
openFileBrowser: function (o) {
241-
var typeTitle,
242-
storeId = this.config['store_id'] !== null ? this.config['store_id'] : 0,
243-
frameDialog = jQuery(o.win.frameElement).parents('[role="dialog"]'),
244-
wUrl = this.config['files_browser_window_url'] +
241+
var targetElementID = tinyMCE.activeEditor.getElement().getAttribute('id'),
242+
originId = this.id,
243+
typeTitle,
244+
storeId,
245+
frameDialog,
246+
wUrl;
247+
248+
this.initialize(targetElementID, this.config);
249+
250+
storeId = this.config['store_id'] !== null ? this.config['store_id'] : 0;
251+
frameDialog = jQuery(o.win.frameElement).parents('[role="dialog"]');
252+
wUrl = this.config['files_browser_window_url'] +
245253
'target_element_id/' + this.id + '/' +
246254
'store/' + storeId + '/';
247255

@@ -255,6 +263,8 @@ define([
255263
typeTitle = this.translate('Insert File...');
256264
}
257265

266+
this.initialize(originId, this.config);
267+
258268
frameDialog.hide();
259269
jQuery('#mceModalBlocker').hide();
260270

0 commit comments

Comments
 (0)