html5sortable
html5sortable copied to clipboard
abort sortleave event
Is there the chance to abort the sortleave event and avoid an item from being removed from the list?
Hey, there is no specific functionality for this. But you should be able to add it to the sortleave event handler.
Did you try a simple event.preventDefault()?
Hey, there is no specific functionality for this. But you should be able to add it to the sortleave event handler.
Did you try a simple
event.preventDefault()?
I've tried to do it as you've said (calling event.preventDefault() on sortleave event). The dragged item is still lost forever (it didn't back to its original position before it is dragged).
Hmm, in this case it is really missing. Would you be able to send a PR that adds this functionality?
how do you prevent the item from being removed in your demo?
@zzaria what specifically are you referring to?
https://lukasoppermann.github.io/html5sortable/index.html in the first sortable list, the element doesn't disappear when dragged off, it just returns to its original postion when the mouse is released

any update?
No. But I am very happy to accept a PR if you are able to send one.