Open madebyaaron opened 6 years ago
meet the same problem but I think the bug itself was not due to swapAnimate plugin, the root cause of this behavior is the Sortable shouldn't trigger sorted event when the source element was moved to an empty draggable container instance.
Hope for help. : )
@madebyaaron thanks for reporting! It's an issue with the SwapAnimation
plugin, it always assumes that two draggable elements get swapped (top/bottom).
The plugin still comes with limitations, but there are future plans for the plugin:
@haoliangwu Just out of curiosity, why do you think Sortable shouldn't trigger the sorted
event if moved into an empty container? It technically gets sorted.
@tsov, uh.., maybe we thought this issue from different angles and I am wrong
but I thought the sort and sorted events should be triggered when the source and over elements were into the same container. Even though the events can be triggered when we drag elements between different containers, if the the overContainer is empty, drag source element to it didn't do any sort business with any over elements, because the over element is null
, that's why swapAnimation plugin throw undefined error during its own animation logic.
Sorry for my poor english, wish you can understand my meaning. :)
Issue: The following error is received when placing a draggable item into an empty container:
Steps to reproduce:
p.s I'm using chrome on macos