Skip to content

Commit 3be5ac8

Browse files
committed
Fic static test, resolve issue by 2 insert image widget
1 parent 8e39f49 commit 3be5ac8

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

lib/web/mage/adminhtml/browser.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ define([
1111
'Magento_Ui/js/modal/prompt',
1212
'Magento_Ui/js/modal/confirm',
1313
'Magento_Ui/js/modal/alert',
14+
'underscore',
1415
'Magento_Ui/js/modal/modal',
1516
'jquery/ui',
1617
'jquery/jstree/jquery.jstree',
17-
'mage/mage'
18-
], function ($, wysiwyg, prompt, confirm, alert) {
18+
'mage/mage',
19+
], function ($, wysiwyg, prompt, confirm, alert, _) {
1920
window.MediabrowserUtility = {
2021
windowId: 'modal_dialog_message',
2122
modalLoaded: false,
@@ -63,13 +64,15 @@ define([
6364

6465
return;
6566
} else if (_.isUndefined(options) && self.modalLoaded === true) {
66-
this.modal.modal('openModal');
67-
return;
67+
if (self.targetElementId === url) {
68+
this.modal.modal('openModal');
69+
return;
70+
}
6871
}
6972

7073
if (this.modal) {
7174
this.modal.html($(content).html());
72-
75+
7376
if (options && typeof options.closed !== 'undefined') {
7477
this.modal.modal('option', 'closed', options.closed);
7578
}
@@ -93,7 +96,7 @@ define([
9396
self.modalLoaded = true;
9497
self.targetElementId = options
9598
? options.targetElementId
96-
: 'null';
99+
: url;
97100
});
98101
},
99102

0 commit comments

Comments
 (0)