Skip to content

Commit b6c3379

Browse files
committed
Merge remote-tracking branch 'remotes/origin/MC-5727-banner-placeholder-disappear-when-user-switch-between-appearance' into cms-team-1-delivery
2 parents c096577 + c8e411b commit b6c3379

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderBannerCommonTest.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@
5858
<group value="pagebuilder"/>
5959
<group value="pagebuilder-banner"/>
6060
<group value="pagebuilder-bannerCommon"/>
61-
<skip>
62-
<issueId value="MC-5023"/>
63-
</skip>
6461
</annotations>
6562
<before>
6663
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>

app/code/Magento/PageBuilder/view/adminhtml/web/js/content-type/banner/preview.js

Lines changed: 5 additions & 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/ts/js/content-type/banner/preview.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ export default class Preview extends BasePreview {
242242
events.on(`${this.config.name}:${this.parent.id}:updateAfter`, () => {
243243
const dataStore = this.parent.dataStore.getState();
244244
const imageObject = dataStore[this.config.additional_data.uploaderConfig.dataScope][0] || {};
245+
// Resolves issue when tinyMCE injects a non-breaking space on reinitialization and removes placeholder.
246+
if (dataStore.message === "<div data-bind=\"html: data.content.html\">&nbsp;</div>") {
247+
this.parent.dataStore.update("", "message");
248+
}
245249
events.trigger(`image:${this.parent.id}:assignAfter`, imageObject);
246250
});
247251
}

0 commit comments

Comments
 (0)