Skip to content

Sortable Node is disappearing after dragging out of small area #665

Answered by clauderic
ashater1 asked this question in Q&A
Discussion options

You must be logged in to vote

This is happening because the default collision detection algorithm for <DndContext> is rectIntersection. This collision detection algorithm requires both the draggable bounding box and the droppable bounding box to be intersecting to register a collision.

The behaviour you're seeing where the sortable item is returning to its initial position is happening because of this. As soon as the active sortable item is no longer intersecting with a droppable, it returns to its initial position because it isn't colliding with anything, so the over property is null.

For optimal user experience when building sortable interfaces, we recommend using a more permissive collision detection algorithm such…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ashater1
Comment options

Answer selected by clauderic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants