Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any way to know that the drag was cancel by pressing esc key? #165

Open
niranjan821 opened this issue Dec 17, 2024 · 0 comments
Open

Comments

@niranjan821
Copy link

niranjan821 commented Dec 17, 2024

We have a virtualized list where a dragged item can be removed from the list when moved due to virtualization. If the user drags the item, brings it back to its original position, and presses the Esc key to cancel the drag, the onDrop event doesn’t trigger until the mouse is released. Instead, the onDragLeave event fires, but this also happens when the item is dragged out of the drop target.

To work around this, I tried using keyboard events to detect the Esc key press. However, the issue is that onDragLeave gets triggered even before the onKeyUp event, and the onKeyDown event doesn’t trigger at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant