Skip to content

Commit 06ca50c

Browse files
author
Hwashiang Yu
committed
MC-15238: Live edit in Safari and Firefox puts caret at start of field after typing
- Resolved firefox issue with mouse range selection on tab header - Resolved firefox command right to go to end of button - Updated resize child button medthod to grabv the correct parent wrapper width
1 parent 159761c commit 06ca50c

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/button-item/_default.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
z-index: auto;
1717

1818
[contenteditable=true] {
19-
display: inline-block;
19+
display: block;
2020
min-height: 18px;
2121
min-width: 20px;
2222
}

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/js/content-type/tab-item/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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,14 +259,13 @@ export default class Preview extends PreviewCollection {
259259
if (this.contentType.dataStore.get("is_same_width") === "true") {
260260
if (buttonItems.length > 0) {
261261
const currentLargestButtonWidth = this.findLargestButtonWidth(buttonItems);
262-
const parentWrapperWidth = $(this.wrapperElement).width();
262+
const parentWrapperWidth = $(this.wrapperElement).find(".buttons-container").width();
263263
if (currentLargestButtonWidth === 0) {
264264
return;
265265
}
266266
buttonResizeValue = Math.min(currentLargestButtonWidth, parentWrapperWidth);
267267
}
268268
}
269-
270269
buttonItems.css("min-width", buttonResizeValue);
271270
}
272271
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export default class Preview extends PreviewCollection {
7070
tabItem.contentType &&
7171
tabItem.contentType.parentContentType &&
7272
tabItem.contentType.parentContentType.id ===
73-
tabItem.contentType.parentContentType.parentContentType.id
73+
this.contentType.parentContentType.id
7474
) {
7575
const newIndex = tabItem
7676
.contentType

0 commit comments

Comments
 (0)