lukasbach / react-complex-tree

Unopinionated Accessible Tree Component with Multi-Select and Drag-And-Drop
https://rct.lukasbach.com
MIT License
983 stars 82 forks source link

Escaping during drag still performs action #49

Closed oliver-seliom closed 2 years ago

oliver-seliom commented 2 years ago

Describe the bug I have 2 trees, in which one item can be dragged onto the other one. When I am doing this, if I change my mind and press the escape key, the drag animation stops and the item is properly returned to the original tree, but the onDrop event still happens on the last focused item of the target tree.

This actually happens even within the same tree.

To Reproduce Steps to reproduce the behavior:

Create 2 trees and follow the bug description

Expected behavior When I press escape, the dragged item should return back to the original tree, and the onDrop event should not occur on the target.

lukasbach commented 2 years ago

Fixed with the new release.