How to cancel drop when hitting escape
See original GitHub issueHi there,
I have two different lists with the same group to interchange items between them.
Hitting escape in the middle of a drag operation cancels the drag operation and lets the item on its original list only if the dragged element wasn’t already over the destination list. If the dragged element is already over the destination, hitting escape acts as if I dropped the item (triggers unchoose, add and so on)
I need to be able to hit escape at any moment and cancel the whole operation, leaving the item on its original list.
I did read the :move prop but it doesn’t seem to help on this. (by the way, the two links are broken on: “See complete example: Cancel.html, cancel.js”)
Thanks for your help
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:6
Top Results From Across the Web
Using ESC event to cancel Drag and Drop - Stack Overflow
I am looking for a way to allow a user to cancel a mouse drag operation by pressing the ESC key.
Read more >How to cancel drag-and-drop with ESC key? - JUCE Forum
There is one tricky workaround to cancel a drag when using DragAndDropContainer and DragAndDropTarget : generate a mouse up event ...
Read more >Cancellation of accidental drag & drop actions by hitting the ...
Cancellation of accidental drag & drop actions by hitting the ESC key ... which is that you can “escape” from such an unwanted...
Read more >Remove [Esc] Button cancelling the queues : r/lostarkgame
Usually when I que PVP or PVE I want to close the window so I can move around and see what in the...
Read more >Use the escape key to stop drag and drops - Mac OS X Hints
In OS X you can (also) drag to the Trash to cancel a drag and drop. [ Reply to This | # ] ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Is there a solution for this?
I came here for this reason as well. Not only does escape persist the current move position, but also dragging to an invalid location outside the list (you can a stop cursor) and releasing the drag-drop persists at the last move position. In both cases I want the change to be reverted. Both of these standard user-scenarios seem like user cancellation of the operation…