Skip to content

Wrong order when saving targetNodes #30

@misha-erm

Description

@misha-erm

Hello,

As I can see drop targets are saved in a wrong order. This affects cases when you have nested drop targets as children are being connected earlier than parents. It leads to the wrong behavior of isOver({shallow}) and wrong order of calling drop handlers.

As You can see in HTML5Backend https://github.com/react-dnd/react-dnd/blob/ddfb0204676a39c8a57dc56a7263cd8f23e265c7/packages/core/html5-backend/src/HTML5Backend.ts#L494 the target ids are unshifted to the array to keep the right order.

Thanks in advance!

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