Skip to content

Commit 3850edf

Browse files
committed
ACP2E-1441: Duplicated page builder elements are not being updated on save
1 parent ef9d627 commit 3850edf

File tree

2 files changed

+11
-4
lines changed
  • app/code/Magento/PageBuilder/view/adminhtml/web

2 files changed

+11
-4
lines changed

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

Lines changed: 6 additions & 2 deletions
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/text/preview.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ export default class Preview extends BasePreview {
252252
&& !this.wysiwyg
253253
&& document.activeElement === this.element
254254
// Check that mouseup occurred outside the element, otherwise "click" event will be triggerred in which
255-
// case we don't need to do anything as the "click" event handled in "activateEditor"
255+
// case we don't need to do anything as the "click" event is handled in "activateEditor"
256256
// Note: click is fired after a full click action occurs; that is, the mouse button is pressed
257257
// and released while the pointer remains inside the same element.
258258
&& this.element !== mouseUpEvent.target
@@ -265,7 +265,10 @@ export default class Preview extends BasePreview {
265265
};
266266

267267
event.stopPropagation();
268-
$(document).on("mouseup", handleMouseUp);
268+
269+
if (this.element && !this.wysiwyg) {
270+
$(document).on("mouseup", handleMouseUp);
271+
}
269272

270273
return true;
271274
}

0 commit comments

Comments
 (0)