-
Notifications
You must be signed in to change notification settings - Fork 1k
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
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 |
@STRML could we at the very least get a way to disable the line that is causing this issue:
for my use case I don't need to prevent scrolling on a mobile device but DO need clicks to work inside the draggable component! Thanks! |
I'm happy to review a PR on this. |
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: