Skip to content

Commit cf8c494

Browse files
author
Lukasz Borowiec
committed
#514: User sees content snapshot on Category Page in Admin Panel - fixed for typescript static tests
1 parent 3ef19b4 commit cf8c494

File tree

1 file changed

+5
-4
lines changed
  • app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/content-type

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import _ from "underscore";
1212
import "../binding/live-edit";
1313
import "../binding/sortable";
1414
import "../binding/sortable-children";
15-
import ContentTypeCollection from "../content-type-collection";
1615
import Config from "../config";
16+
import ContentTypeCollection from "../content-type-collection";
1717
import ContentTypeCollectionInterface from "../content-type-collection.types";
1818
import ContentTypeConfigInterface, {ConfigFieldInterface} from "../content-type-config.types";
1919
import createContentType from "../content-type-factory";
@@ -499,6 +499,9 @@ export default class Preview implements PreviewInterface {
499499
* Bind events
500500
*/
501501
protected bindEvents() {
502+
let pageBuilderId = Config.getContentSnapshot().pageBuilderId,
503+
fullScreenModeChangeAfterEvent = `stage:${pageBuilderId}:fullScreenModeChangeAfter`;
504+
502505
this.contentType.dataStore.subscribe(
503506
(data: DataObject) => {
504507
this.updateObservables();
@@ -515,9 +518,7 @@ export default class Preview implements PreviewInterface {
515518
},
516519
);
517520
}
518-
events.on(`stage:${Config.getContentSnapshot().pageBuilderId}:fullScreenModeChangeAfter`,
519-
this.toggleAccessibility.bind(this)
520-
);
521+
events.on(fullScreenModeChangeAfterEvent,this.toggleAccessibility.bind(this));
521522
}
522523

523524
/**

0 commit comments

Comments
 (0)