-
Notifications
You must be signed in to change notification settings - Fork 214
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
Opt out of the browser's native cancel animation #146
Comments
It doesn't seem like there's a way to opt out of the animation in the HTML Drag and Drop specification
|
Thanks @yangannyx. I did some experimentation and reading:
There's some inconsistency, where a no-op drop (e.g. a drop on something without a handler for the event) immediately hides the drag preview, but a canceled drag does the animation. What I wanted to do was get the same behaviour as a no-op drop, when canceling a drop. In the application, I wanted to revert my "potential" drop targets' styling immediately, instead of waiting for the animation to finish. But because we cannot detect the drop cancelation, it's not possible. No biggie. Maybe I've missed something here - I'll leave this open in case any others with more experience with the native dnd APIs know of a workaround. |
I noticed this in the docs for
So maybe there is a way to opt out of the cancel animation, or detect cancellation as soon as the user cancels? |
onDropTargetChange
andonDrop
events fire after the cancel animation finishes. Is it possible to detect cancelation before the animation finishes?Thanks.
The text was updated successfully, but these errors were encountered: