Skip to content

Commit 9e029fa

Browse files
committed
MC-3775: Button editable state is not consistent with the options panel appearing
- Fix JS error when focusing next button
1 parent 4dbd597 commit 9e029fa

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/button-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/button-item/preview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default class Preview extends BasePreview {
6363
// Have we moved the focus onto another button in the current group?
6464
if ($.contains(parentPreview.wrapperElement, event.relatedTarget)) {
6565
const buttonItem = ko.dataFor(event.relatedTarget) as Preview;
66-
if (buttonItem) {
66+
if (buttonItem && buttonItem.parent && buttonItem.parent.parent) {
6767
const newIndex = buttonItem.parent.parent.children().indexOf(buttonItem.parent);
6868
parentPreview.focusedButton(newIndex);
6969
}

0 commit comments

Comments
 (0)