Skip to content

Commit 546974d

Browse files
author
Dmytro Poperechnyy
committed
MAGETWO-44873: Media Storage window opens behind "Insert/Edit Image" dialog
1 parent 777f782 commit 546974d

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

lib/web/mage/adminhtml/browser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ define([
3737
if (this.modal) {
3838
this.modal.html($(content).html());
3939
} else {
40-
this.modal = $(content).modal({
40+
this.modal = $(content).modal($.extend({
4141
title: title || 'Insert File...',
4242
modalClass: 'magento',
4343
type: 'slide',
4444
buttons: []
45-
});
45+
}, options));
4646
}
4747
this.modal.modal('openModal');
4848
$.ajax({

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

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,10 @@ define([
155155
},
156156

157157
openFileBrowser: function(o) {
158-
var typeTitle;
159-
var storeId = this.config.store_id !== null ? this.config.store_id : 0;
160-
var wUrl = this.config.files_browser_window_url +
158+
var typeTitle,
159+
storeId = this.config.store_id !== null ? this.config.store_id : 0,
160+
frameDialog = jQuery(o.win.frameElement).parents('[role="dialog"]'),
161+
wUrl = this.config.files_browser_window_url +
161162
'target_element_id/' + this.id + '/' +
162163
'store/' + storeId + '/';
163164

@@ -171,11 +172,13 @@ define([
171172
typeTitle = this.translate('Insert File...');
172173
}
173174

175+
frameDialog.hide();
176+
jQuery('#mceModalBlocker').hide();
177+
174178
MediabrowserUtility.openDialog(wUrl, false, false, typeTitle, {
175-
onBeforeShow: function(win) {
176-
win.element.setStyle({
177-
zIndex: 1100
178-
});
179+
closed: function() {
180+
frameDialog.show();
181+
jQuery('#mceModalBlocker').show();
179182
}
180183
});
181184
},

0 commit comments

Comments
 (0)