From d9421892fb1b8815fc3092ea3c18e3444c3973df Mon Sep 17 00:00:00 2001 From: michaela-mm <63740955+michaela-mm@users.noreply.github.com> Date: Fri, 1 Aug 2025 20:30:23 +0200 Subject: [PATCH] fix: Check for existing event group in cleanUp() (#9265) --- core/workspace_svg.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/workspace_svg.ts b/core/workspace_svg.ts index 6c6b59301..af395b077 100644 --- a/core/workspace_svg.ts +++ b/core/workspace_svg.ts @@ -1674,7 +1674,10 @@ export class WorkspaceSvg /** Clean up the workspace by ordering all the blocks in a column such that none overlap. */ cleanUp() { this.setResizesEnabled(false); - eventUtils.setGroup(true); + const existingGroup = eventUtils.getGroup(); + if (!existingGroup) { + eventUtils.setGroup(true); + } const topBlocks = this.getTopBlocks(true); const movableBlocks = topBlocks.filter((block) => block.isMovable()); @@ -1722,7 +1725,7 @@ export class WorkspaceSvg block.getHeightWidth().height + minBlockHeight; } - eventUtils.setGroup(false); + eventUtils.setGroup(existingGroup); this.setResizesEnabled(true); }