Closed danipardo closed 3 years ago
This is because you are actually moving all nodes (when dragging a selected node all selected nodes are moved). Try this option:
https://www.jstree.com/api/#/?q=drag_selec&f=$.jstree.defaults.dnd.drag_selection (set it to false
).
Oh, makes sense, I didn't thought about it that way. Thanks! :)
Proof of concept:
https://codepen.io/dani-pardo/pen/wvzVNbm
If you select all checkboxes, and then you move L1A after L1B, you will see that L2 gets moved inside L1, where it should'nt be moved at all (L2 should remain after L1). This only happens when checkboxes are checked. If they are unchecked, the behaviour is correct.