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
Not possible to listen to click events inside a Draggable
on Mobile
#728
Comments
ChristophP
changed the title
Not possinle to listen to click events inside a
Not possible to listen to click events inside a Aug 7, 2023
Draggable
on MobileDraggable
on Mobile
I have the same problem. |
I have the same problem too. |
@quolpr Hi, can you help us? |
This solution might help with this problem [JeanNicolasdeLamballerie](#666 (comment)) I tried it and I got the links to work on mobile |
@NadirBakhsh oh that seems like a nice solution. Will need to try. |
The |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
we are using react-draggable and have a link inside a draggable which should be clickable.
On a non-touch device this works fine as the click event fires normally. However, on touch devices the click event is not fired at all, which is unfortunate.
The line of code responsible for this, seems to be this one:
react-draggable/lib/DraggableCore.js
Line 295 in 44a8c6e
touchstart
event are cancelled there, resulting in the click never firing.Since this line seems to be in place to prevent scrolling on touch devices, would a possible solution be to cancel touchmove instead?
Another solution may be to cancel the touchstart event higher up
The text was updated successfully, but these errors were encountered: