bevacqua / dragula

:ok_hand: Drag and drop so simple it hurts
https://bevacqua.github.io/dragula/
MIT License
21.89k stars 1.97k forks source link

Sibling argument in "accepts" callback points to wrong node when dragging upward #673

Open danny-andrews opened 3 years ago

danny-andrews commented 3 years ago

The sibling argument in the "accepts" callback points to the dragged node, not the sibling.

Steps to reproduce

  1. Go to https://codepen.io/danny-andrews/pen/oNYBqoL.
  2. Drag "Two" up to the top of the list.
  3. Open console.

Expected "One" is printed to the console, as it is the new sibling.

Actual "Two" is printed to the console.