Search code examples
htmldraggablerevert

Is there a way to set HTML5 drag end effect? (i.e. no revert)


When finish dragging a HTML5 draggable element, the element will revert back to its original location. Is it possible to prevent the feedback image to revert?

Instead of reverting back, I want the feedback image to disappear after the drag is completed.


Solution

  • Draggable will revert unless it encounters with a droppable element. To make draggable disappears onmouseup, I've created a dummy droppable to accept the drop.