-
-
Notifications
You must be signed in to change notification settings - Fork 257
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
How to disable the click event when drag & drop #452
Comments
Add delay to click |
I have the same problem but I don't understand the solution "Add delay to click". Can you provide an example @acai69 ? Thanks! I solved it for now by measuring the length between the mouseDown and mouseUp and preventing the click if this is longer than 250ms (kind of arbitrary). But ideally this click event is not triggered at all imho. |
That's it! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is a demo that we can trigger the click event when we click the button, is there any way to prevent triggering the click event when drag & drop (Pan) on the button? Because my view is clickable everywhere, I hope to disable it when executing the drag & drop. Thanks!
https://bettertyped.github.io/react-zoom-pan-pinch/?path=/story/examples-controls--controls
The text was updated successfully, but these errors were encountered: