Sortable icon indicating copy to clipboard operation
Sortable copied to clipboard

[bug] revertOnSpill broken with `sort: false` (`putSortable` empty)

Open mejo- opened this issue 3 years ago • 0 comments

Describe the bug

When using sortableJS to allow moving items from one list to another without sorting functionality (with sort: false), the revertOnSpill plugin breaks the ability to move items from one list to another.

That's because putSortable for some reason is empty in the object given to the plugin with sortable: false.

To Reproduce Steps to reproduce the behavior:

  1. Create a nested list with sublist, all of them with group: { name: 'group', pull: true, put: true } and sort: false
  2. Make sure that moving items between the lists back and forth works
  3. Add revertOnSpill: true to the Sortable config object
  4. Try to move items between the list
  5. Moving items up to a parent list will not work because pubSortable is empty
  6. Moving items down to a child list still works because toSortable is set to activeSortable, which is a parent of the child list

Expected behavior

Information

sortablejs = ^1.10.2 (dependency of vue.draggable)

mejo- avatar Jul 20 '22 14:07 mejo-