Skip to content

Commit 1a0221b

Browse files
committed
Merge remote-tracking branch 'origin/develop' into magento-mpi-MC-29890
2 parents 4d6debc + bb26b84 commit 1a0221b

File tree

5 files changed

+27
-9
lines changed

5 files changed

+27
-9
lines changed

app/code/Magento/PageBuilder/Model/Stage/Preview.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ class Preview
4242
*/
4343
private $scopeConfig;
4444

45+
/**
46+
* @var bool
47+
*/
48+
private $isPreview = false;
49+
4550
/**
4651
* Preview constructor.
4752
* @param \Magento\Store\Model\App\Emulation $emulation
@@ -67,11 +72,6 @@ public function __construct(
6772
$this->scopeConfig = $scopeConfig;
6873
}
6974

70-
/**
71-
* @var bool
72-
*/
73-
private $isPreview;
74-
7575
/**
7676
* Retrieve the area in which the preview needs to be ran in
7777
*

app/code/Magento/PageBuilder/view/adminhtml/web/js/form/element/image-uploader.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,19 @@ define([
235235
hasData: function () {
236236
// Some of the components automatically add an empty object if the value is unset.
237237
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;
238251
}
239252
});
240253
});

app/code/Magento/PageBuilder/view/adminhtml/web/js/property/link.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/code/Magento/PageBuilder/view/adminhtml/web/template/form/element/uploader/preview/image.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,16 @@
1010
<div class="pagebuilder-options-wrapper">
1111
<ul class="pagebuilder-options-links">
1212
<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" />
1419
</li>
1520
<li class="pagebuilder-options-link">
1621
<label
17-
data-bind="event: {change: addFileFromMediaGallery, click: openMediaBrowserDialog}"
22+
data-bind="event: {change: addFileFromMediaGallery, click: openMediaBrowserDialog, mousedown: stopEvent}"
1823
class="file-uploader-button action-default"
1924
attr="id: mediaGalleryUid, 'data-id': getFileId()"
2025
disable="disabled"

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/property/link.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export default class Link implements PropertyReaderInterface {
5050
const attributeIdMatches = href.match(regexp);
5151

5252
if (!attributeIdMatches) {
53-
return "";
53+
return href;
5454
}
5555

5656
return attributeIdMatches[1];

0 commit comments

Comments
 (0)