question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to cancel drop when hitting escape

See original GitHub issue

Hi 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:open
  • Created 3 years ago
  • Reactions:4
  • Comments:6

github_iconTop GitHub Comments

3reactions
mapkbalajicommented, Mar 25, 2021

Is there a solution for this?

3reactions
Agendumcommented, Jan 12, 2021

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…

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found