File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed
app/code/Magento/PageBuilder/view/adminhtml/web
template/form/element/uploader/preview Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -235,6 +235,19 @@ define([
235
235
hasData : function ( ) {
236
236
// Some of the components automatically add an empty object if the value is unset.
237
237
return this . _super ( ) && ! $ . isEmptyObject ( this . value ( ) [ 0 ] ) ;
238
+ } ,
239
+
240
+ /**
241
+ * Stop event to prevent it from reaching any objects other than the current object.
242
+ *
243
+ * @param {Object } uploader
244
+ * @param {Event } event
245
+ * @returns {Boolean }
246
+ */
247
+ stopEvent : function ( uploader , event ) {
248
+ event . stopPropagation ( ) ;
249
+
250
+ return true ;
238
251
}
239
252
} ) ;
240
253
} ) ;
Original file line number Diff line number Diff line change 10
10
< div class ="pagebuilder-options-wrapper ">
11
11
< ul class ="pagebuilder-options-links ">
12
12
< li class ="pagebuilder-options-link ">
13
- < label class ="file-uploader-button action-default " attr ="for: uid " disable ="disabled " translate ="translations.uploadNewImage " />
13
+ < label
14
+ data-bind ="event: {mousedown: stopEvent} "
15
+ class ="file-uploader-button action-default "
16
+ attr ="for: uid "
17
+ disable ="disabled "
18
+ translate ="translations.uploadNewImage " />
14
19
</ li >
15
20
< li class ="pagebuilder-options-link ">
16
21
< label
17
- data-bind ="event: {change: addFileFromMediaGallery, click: openMediaBrowserDialog} "
22
+ data-bind ="event: {change: addFileFromMediaGallery, click: openMediaBrowserDialog, mousedown: stopEvent } "
18
23
class ="file-uploader-button action-default "
19
24
attr ="id: mediaGalleryUid, 'data-id': getFileId() "
20
25
disable ="disabled "
You can’t perform that action at this time.
0 commit comments