Skip to content

Commit 79e19d0

Browse files
committed
MC-4128: Minimum Height doesn't work with Parallax turned ON for Row Content Type on stage preview
Store/apply correct style after destroying, as jarallax incorrectly overrides it with stale value
1 parent 9a9a039 commit 79e19d0

File tree

2 files changed

+8
-0
lines changed
  • app/code/Magento/PageBuilder/view/adminhtml/web

2 files changed

+8
-0
lines changed

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

Lines changed: 5 additions & 0 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/row/preview.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ export default class Preview extends PreviewCollection {
3434
private buildJarallax = _.debounce(() => {
3535
// Destroy all instances of the plugin prior
3636
try {
37+
// store/apply correct style after destroying, as jarallax incorrectly overrides it with stale value
38+
const style = this.element.getAttribute("style");
3739
jarallax(this.element, "destroy");
40+
this.element.setAttribute("style", style);
3841
} catch (e) {
3942
// Failure of destroying is acceptable
4043
}

0 commit comments

Comments
 (0)