Skip to content

Commit 232fa03

Browse files
committed
PB-170: TinyMCE Performance is very poor with multiple instances on Stage
- Resolve issue with saving content types from edit panel
1 parent b4cea28 commit 232fa03

File tree

6 files changed

+6
-12
lines changed

6 files changed

+6
-12
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/js/content-type/banner/preview.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/js/content-type/slide/preview.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/js/content-type/text/preview.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/ts/js/content-type/banner/preview.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,7 @@ export default class Preview extends BasePreview {
105105
element.innerHTML = this.data.content.html();
106106
this.contentType.dataStore.subscribe(() => {
107107
// If we're not focused into TinyMCE inline, update the value when it changes in the data store
108-
if (!element.classList.contains("mce-edit-focus")
109-
&& this.wysiwyg.getAdapter().id !== getActiveEditor().id
110-
) {
108+
if (!this.wysiwyg || (this.wysiwyg && this.wysiwyg.getAdapter().id !== getActiveEditor().id)) {
111109
element.innerHTML = this.data.content.html();
112110
}
113111
}, "message");

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,7 @@ export default class Preview extends BasePreview {
8181
element.innerHTML = this.data.content.html();
8282
this.contentType.dataStore.subscribe(() => {
8383
// If we're not focused into TinyMCE inline, update the value when it changes in the data store
84-
if (!element.classList.contains("mce-edit-focus")
85-
&& this.wysiwyg.getAdapter().id !== getActiveEditor().id
86-
) {
84+
if (!this.wysiwyg || (this.wysiwyg && this.wysiwyg.getAdapter().id !== getActiveEditor().id)) {
8785
element.innerHTML = this.data.content.html();
8886
}
8987
}, "content");

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,7 @@ export default class Preview extends BasePreview {
9494
element.innerHTML = this.data.main.html();
9595
this.contentType.dataStore.subscribe(() => {
9696
// If we're not focused into TinyMCE inline, update the value when it changes in the data store
97-
if (!element.classList.contains("mce-edit-focus")
98-
&& this.wysiwyg.getAdapter().id !== getActiveEditor().id
99-
) {
97+
if (!this.wysiwyg || (this.wysiwyg && this.wysiwyg.getAdapter().id !== getActiveEditor().id)) {
10098
element.innerHTML = this.data.main.html();
10199
}
102100
}, "content");

0 commit comments

Comments
 (0)