Skip to content

Commit 1d4ab70

Browse files
author
Hwashiang Yu
committed
MC-3474: Apply resizing functionality to preview
- Updated button item selector
1 parent d0a0890 commit 1d4ab70

File tree

2 files changed

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

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ export default class Preview extends PreviewCollection {
276276
const widthProperties = ["paddingLeft", "paddingRight", "borderLeftWidth", "borderRightWidth"];
277277
const calculatedButtonWidth: number = widthProperties.reduce((accumulatedWidth, widthProperty): number => {
278278
return accumulatedWidth + (parseInt(buttonItem.css(widthProperty), 10) || 0);
279-
}, buttonItem.find("span").width());
279+
}, buttonItem.find("[data-element='link_text']").width());
280280

281281
return calculatedButtonWidth;
282282
}

0 commit comments

Comments
 (0)