react-dnd-mouse-backend icon indicating copy to clipboard operation
react-dnd-mouse-backend copied to clipboard

Wrong order when saving targetNodes

Open misha-erm opened this issue 6 years ago • 3 comments

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!

misha-erm avatar Sep 26 '19 16:09 misha-erm

@zyzo

misha-erm avatar Sep 27 '19 10:09 misha-erm

@MikeYermolayev did you ever figure out a fix for this issue?

airhorns avatar Mar 26 '21 14:03 airhorns

@airhorns I switched to react-dnd-touch-backend

misha-erm avatar Apr 06 '21 19:04 misha-erm