Try dragging "CCC" item below the list. Before this fix, the element gets returned to the end of the container, disregarding the fact that there were non-element nodes after it on drag start. After the fix, it gets returned to its proper position.
I tried writing a test for this issue, but I couldn't figure how to simulate actually dragging elements around, and that's required to trigger the bug. I couldn't find any tests that did dragging (AFAICT). If someone can point me to a test that actually drags elements around, I'll have a look at it and write the test.
Ideally, non-element nodes should be respected while dragging as well, but that might be a bit more difficult (just a bit, I think). I'll give that a shot if there's positive response to this PR.
Fixes #550. All tests pass.
Try dragging "CCC" item below the list. Before this fix, the element gets returned to the end of the container, disregarding the fact that there were non-element nodes after it on drag start. After the fix, it gets returned to its proper position.
I tried writing a test for this issue, but I couldn't figure how to simulate actually dragging elements around, and that's required to trigger the bug. I couldn't find any tests that did dragging (AFAICT). If someone can point me to a test that actually drags elements around, I'll have a look at it and write the test.
Ideally, non-element nodes should be respected while dragging as well, but that might be a bit more difficult (just a bit, I think). I'll give that a shot if there's positive response to this PR.
Thanks!