Skip to content

Commit d942189

Browse files
authored
fix: Check for existing event group in cleanUp() (#9265)
1 parent c037e7d commit d942189

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

core/workspace_svg.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,7 +1674,10 @@ export class WorkspaceSvg
16741674
/** Clean up the workspace by ordering all the blocks in a column such that none overlap. */
16751675
cleanUp() {
16761676
this.setResizesEnabled(false);
1677-
eventUtils.setGroup(true);
1677+
const existingGroup = eventUtils.getGroup();
1678+
if (!existingGroup) {
1679+
eventUtils.setGroup(true);
1680+
}
16781681

16791682
const topBlocks = this.getTopBlocks(true);
16801683
const movableBlocks = topBlocks.filter((block) => block.isMovable());
@@ -1722,7 +1725,7 @@ export class WorkspaceSvg
17221725
block.getHeightWidth().height +
17231726
minBlockHeight;
17241727
}
1725-
eventUtils.setGroup(false);
1728+
eventUtils.setGroup(existingGroup);
17261729
this.setResizesEnabled(true);
17271730
}
17281731

0 commit comments

Comments
 (0)