File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
apps/sim/app/workspace/[workspaceId]/w/[workflowId] Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ import {
6060 getClampedPositionForNode ,
6161 getDescendantBlockIds ,
6262 getEdgeSelectionContextId ,
63+ getNodeSelectionContextId ,
6364 getWorkflowLockToggleIds ,
6465 isBlockProtected ,
6566 isEdgeProtected ,
@@ -3205,7 +3206,10 @@ const WorkflowContent = React.memo(
32053206 const draggedParentId = blocks [ node . id ] ?. data ?. parentId
32063207 const parentIsSelected =
32073208 draggedParentId && selectedNodes . some ( ( n ) => n . id === draggedParentId )
3208- if ( ! parentIsSelected ) {
3209+ const contextMismatch =
3210+ getNodeSelectionContextId ( draggedNodeInSelected , blocks ) !==
3211+ getNodeSelectionContextId ( selectedNodes [ 0 ] , blocks )
3212+ if ( ! parentIsSelected && ! contextMismatch ) {
32093213 setDisplayNodes ( ( currentNodes ) =>
32103214 currentNodes . map ( ( n ) => ( n . id === node . id ? { ...n , selected : true } : n ) )
32113215 )
You can’t perform that action at this time.
0 commit comments