-
Hello! I'm using with great satisfaction I drag elements to reorder them but also to drop them on an outside element. It works even if it could be simplified, I think (I added a dragstart event handler to the elements currently). My small problem is that when I drag an item to the outside the list becomes reordered making it modified. I tried to disable sorting if I drag the element with ctrl pushed, to distinguish drag to outside, but without success. Maybe the solution is to use onChoose and here disabling sorting if ctrl pushed. But I don't know how to add this to the Suggestions? Experience? Ideas? Thanks a lot! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
If you do: new Sortable({
onMove: function (evt, originalEvent) {
return false; // Return false to cancel sorting
},
}) And in the onMove function you can check if CTRL is down or something in the |
Beta Was this translation helpful? Give feedback.
If you do:
And in the onMove function you can check if CTRL is down or something in the
originalEvent
parameter