angular-legacy-sortablejs
angular-legacy-sortablejs copied to clipboard
Model on the event gets stuck to item moved to/from nested list
trafficstars
I've discovered another bug with the case of nested list.
If we consider the list like this
- item 1
- subitem 1
- item 2
- item 3
As long as you move items in the main list all will be fine. However, once you move item (e.g. item 2) to nested list all following moves will have event.model set to item 2. In other words, if you then try to move item 3 above item 1 the move will succeed, however in callbacks (e.g. onEnd) the event.model will be wrong.
The same is true if the first action is moving an item from from the nested list (e.g. subitem 1). All following moves will have subitem 1 set as the model.
Here's minimal codepen showing the problem.