Please, do you have any idea how to cancel the drag&drop with the Escape button and return dragged item to its original position?
I am using https://github.com/RubaXa/Sortable, the code is:
Sortable.create(shelf2, {
animation: 200,
group: {
name: "shared",
revertClone: true
},
sort: true,
// Set the delay for the Drag&Drop effect
delay: 1000,
ghostClass: "sortable-ghost",
chosenClass: "sortable-chosen"
});
And here is the full example on Codepen: https://codepen.io/vlastapolach/pen/xreXpv
Any ideas please?
Problem solved by switching to different library - jQueryUI and calling their native Cancel method: