-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[added] Fast touch clicks #495
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
Conversation
@kenwheeler Although I've never done it, I believe we can use |
Ok I'll check that out and get this updated, thanks. |
Just a thought: When this work is done it may be useful to include all the special click/touch handling in the |
Ok looks like that worked for the tests. In regards to the |
Amended. If this looks ok to you, I'll squash these into a single commit |
Thanks @kenwheeler, this looks great. Let's go ahead and squash them! The only question left in my mind is: do we always want to treat |
@mjackson Looked into how the touchstart/touchend relationship is working in React and it looks like if you start on target but end off target it still fires, but if you start off target it won't. I've seen a couple wrappers like https://github.com/dogfessional/react-touchable and https://github.com/JedWatson/react-tappable. |
Huh, that's interesting. So you're saying that |
@mjackson funny right? Try the hamburger on postocracy.com on mobile/tablet to see what I mean. Seems backwards. |
@kenwheeler Wow, I see what you mean. I'm honestly not sure how to proceed here. We could try and roll our own touch support based on the work in react-tap-event-plugin (or just make it a dep and have a separate build for touch?) or we could just suggest users use react-tap-event-plugin together with I guess a 3rd option would be to just merge this in the short term with a caveat that anyone who uses it may have sketchy touch support. @rpflorence What do you think? |
If you do pull this in, please at least make it configurable via some sort of options flag. Not saying that this will cause any problems, but touch issues can be tedious to debug. I'd like to not have to worry about what's happening in my routing library if something becomes an issue in my app. |
Our Any behavior that doesn't match exactly what an anchor does, I'd rather not try to do with We have the right mixins for folks to create their own 👎 |
Agreed. I'll wait for React to address it. |
Just FYI, with this implementation, if I start a scroll on a link, scroll 200 pixels with my finger, and then stop, the link will navigate. It's all so tricky. |
@kenwheeler also, thanks for being involved :) |
Just passing by, I'm using React-tappable and it works great. I've not tested yet but I think it can be used this way:
So it should be pretty easy to build a "TappableLink" abstraction |
[DONT MERGE]
Because tests are done in Firefox, I can't simulate touch events in order to test this. Did you have a recommendation?