Skip to content

Commit 7c0952d

Browse files
committed
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.
1 parent b4f9072 commit 7c0952d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]

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)