diff --git a/apps/designer/app/shared/nano-states/use-subscribe-drag-drop-state.ts b/apps/designer/app/shared/nano-states/use-subscribe-drag-drop-state.ts index 80923995ca..616bda5815 100644 --- a/apps/designer/app/shared/nano-states/use-subscribe-drag-drop-state.ts +++ b/apps/designer/app/shared/nano-states/use-subscribe-drag-drop-state.ts @@ -12,7 +12,9 @@ export const useSubscribeDragAndDropState = () => { useSubscribe<"dragStart", DragStartPayload>( "dragStart", ({ origin, dragItem }) => { - setState({ isDragging: true, origin, dragItem }); + // It's possible that dropTargetChange comes before dragStart. + // Sot it's important to spread the current ...state here. + setState({ ...state, isDragging: true, origin, dragItem }); } );