Skip to content

Looping and hanging when using onDragOver #1829

@CatherineFD

Description

@CatherineFD

Problem description
Initially, I ran into the problem of overlapping elements when dragging in a grid using display:flex and flex-wrap: wrap. Drag and drop processing was performed in the onDragEnd event.

Image

What have you tried
I found a solution in the discussion: #117
— using the onDragOver event.
Everything works correctly on the old version of the libraries.:
Sandbox is a working example

"@dnd-kit/core": "1.0.1",
"@dnd-kit/modifiers": "1.0.1",
"@dnd-kit/sortable": "1.0.1"

The problem is in the new version
After updating the libraries, there was a looping. The draggable element freezes and stops moving, and the browser freezes — only reloading the page helps.
It seems that the element cannot determine the correct position and endlessly iterates through the options.
Sandbox example is not working

"@dnd-kit/core": "6.3.1",
"@dnd-kit/modifiers": "9.0.0",
"@dnd-kit/sortable": "10.0.0",
Image

Question
Has anyone experienced similar behavior on newer versions of dnd-kit? Is there a workaround or an updated approach to onDragOver processing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions