Skip to content

[BUG] Dragging animation doesn't correctly work with React 19 in StrictMode and Ant Design #3169

@MaximLama

Description

@MaximLama

I have a problem. I made a file structure tree. When I move a file from the top folder to the bottom one, the position of moving the file breaks.

Image

1. See the CodeSandbox

2. How to get bug

Open an empty folder (if you drag it to the closed one, the bug does not work), drag the file from some upper folder to the opened lower one. When dragging a file, hover over the folder name so that the dragging logic works. Then you will get a bug with the file offset from where it should be. The bug works when dragging from the top folder to the bottom one. If you drag and drop from the bottom folder to the top, then everything works fine.

3. The cause of the bug

The bug only works if there is a StrictMode component and only in version 19 of React. If you remove StrictMode in version 19, then everything works. If you use version 18, it works even if there is StrictMode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions