Skip to content

Commit af2ab79

Browse files
author
Hwashiang Yu
committed
MC-3732: Buttons Do Not Display As Same Width After Page Refresh When There's A Lot Of Page Content
- Added condition if resize value is 0, don't update
1 parent eff8896 commit af2ab79

File tree

2 files changed

+6
-2
lines changed
  • app/code/Magento/PageBuilder/view/adminhtml/web

2 files changed

+6
-2
lines changed

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

Lines changed: 3 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/buttons/preview.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,9 @@ export default class Preview extends PreviewCollection {
245245
buttonResizeValue = currentLargestButton.outerWidth();
246246
}
247247
}
248-
buttonItems.css("min-width", buttonResizeValue);
248+
if (buttonResizeValue > 0) {
249+
buttonItems.css("min-width", buttonResizeValue);
250+
}
249251
}
250252
}
251253

0 commit comments

Comments
 (0)