Skip to content

Commit 01063b5

Browse files
committed
MC-3392: Hide Content block/ container from the stage
- Ensure count is reset if event is forced
1 parent 3a210e5 commit 01063b5

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/js/stage.js

Lines changed: 7 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/stage.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,12 @@ export default class Stage {
182182
this.interacting(true);
183183
});
184184
events.on("stage:interactionStop", (args: {force: boolean}) => {
185-
if (--interactionLevel === 0 || (_.isObject(args) && args.force === true)) {
185+
const forced = (_.isObject(args) && args.force === true);
186+
if (--interactionLevel === 0 || forced) {
186187
this.interacting(false);
188+
if (forced) {
189+
interactionLevel = 0;
190+
}
187191
}
188192
});
189193
events.on("stage:childFocusStart", () => this.focusChild(true));

0 commit comments

Comments
 (0)