Open tushar-singh opened 8 years ago
You only need touch events some times. And it'd be case by case, just like we do click case by case, no?
Doing it case-by-case will probably be hard to maintain down the line
And who knows, we might use touch events for a lot of stuff. Off the top my head - carousel, offcanvas, alerts(?). I'll revisit this and see whats best given the changes since I created this issue
Yeah I think you're right, I wasnt sure if you intended the listener to be running on every component. Not sure if thats performant.
I definitely want to integrate swipe in a lot of areas. I think they should even have an if touch so we can handle the components a bit differently. A table is a great example. And so is a list that has options. Canvas as well.
Definitely wouldn't wanna add listeners to elements that don't want to use them :)
"if touch" meaning something like Modernizr.touch? We can integrate that probably.
We'll need something to allow easily attaching functions to mouse/tap/gestures
I'm aiming for a clean implementation. Something like this (using HOC to modify all components from wrapper.jsx)
I'm not entirely sure if this is feasible - will update once I make an attempt
If someone knows a good library (with a permissive licence), please share