Skip to content

Commit 81cd857

Browse files
waleedlatif1claude
andcommitted
fix(workflow): avoid duplicate container updates during drag
Add !change.dragging check to only handle keyboard movements in onNodesChange, since mouse drags are already handled by onNodeDrag. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b4f9072 commit 81cd857

File tree

1 file changed

+6
-1
lines changed
  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]

1 file changed

+6
-1
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2366,7 +2366,12 @@ const WorkflowContent = React.memo(() => {
23662366
// Handle position changes (e.g., from keyboard arrow key movement)
23672367
// Update container dimensions when child nodes are moved
23682368
for (const change of changes) {
2369-
if (change.type === 'position' && 'position' in change && change.position) {
2369+
if (
2370+
change.type === 'position' &&
2371+
!change.dragging &&
2372+
'position' in change &&
2373+
change.position
2374+
) {
23702375
updateContainerDimensionsDuringMove(change.id, change.position)
23712376
}
23722377
}

0 commit comments

Comments
 (0)