From 40de1d3c79386aa60ee8cde969148b577408db80 Mon Sep 17 00:00:00 2001 From: Vikhyath Mondreti Date: Sun, 18 Jan 2026 13:33:46 -0800 Subject: [PATCH] fix --- .../workspace/[workspaceId]/w/[workflowId]/workflow.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx index f974a292b..b2d2a4caa 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx @@ -2165,8 +2165,11 @@ const WorkflowContent = React.memo(() => { }) const selectedIds = selectedIdsRef.current as string[] | null if (selectedIds !== null) { - const { currentBlockId, clearCurrentBlock } = usePanelEditorStore.getState() - if (currentBlockId && selectedIds.indexOf(currentBlockId) === -1) { + const { currentBlockId, clearCurrentBlock, setCurrentBlockId } = + usePanelEditorStore.getState() + if (selectedIds.length === 1 && selectedIds[0] !== currentBlockId) { + setCurrentBlockId(selectedIds[0]) + } else if (selectedIds.length === 0 && currentBlockId) { clearCurrentBlock() } }