Skip to content
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

onSwiped... events not fired #21

Closed
akshayakrsh opened this issue Nov 1, 2015 · 7 comments
Closed

onSwiped... events not fired #21

akshayakrsh opened this issue Nov 1, 2015 · 7 comments

Comments

@akshayakrsh
Copy link

Hi,

I am using the npm v3.0.2 of this module. While it works on most devices e.g. iPhone 5, 5s, 6 and many android phones, there's a particular device I have found on which the onSwiped family of events arent firing. The phone model is Samsung Galaxy J1 Ace with Android v4.4 installed on it.

On further debugging, I observed the issue was caused cuz of onTouchEnd event not getting fired at end of a swipe gesture. I also observed that onTouchEnd event, was getting fired if I just did a TAP. On google around, I found some devs mentioning to call e.preventDefault() to be invoked in touchStart or touchMove events. But, I see thats not happening in this library.

Can you please see whats going on? And let me know about how to fix this?

Thanks!

@Bogdaan
Copy link

Bogdaan commented Dec 16, 2015

+1 onSwiped not fired

@hartzis
Copy link
Collaborator

hartzis commented Jan 1, 2016

@lordakshaya It does look like e.preventDefault() is being called in touchMove here.

We now have an example app working with the latest version 3.1.0, please let us know if it is still happening.

@fruitkiwi
Copy link

onSwipedLeft and onSwipedRight are fired only if also onSwipingLeft and onSwipingRight are set
on Android 4.x

@hartzis
Copy link
Collaborator

hartzis commented Jan 23, 2016

@fruitkiwi i see what you are saying. It seems we need to figure out the best way to trigger e.preventDefault() for most solutions, but I don't think firing it all the time is the answer.

I don't know the best solution, open to ideas. @goatslacker

Ideas:

  • prop of preventDefault that has a default, true or false and either always prevents or not?
  • Maybe a useragent check, but that seems dirty.

also related to #28, #27.

related info links:

@ChrisRus
Copy link

ChrisRus commented Mar 1, 2016

Looks like some effort to address this on fork https://github.com/abilashs90/react-swipeable/commits/master :: I'm wandering in to try to re-use this code and pass back changes that I think would be generally useful. Thanks for the effort here @hartzis.

@hartzis
Copy link
Collaborator

hartzis commented May 4, 2016

#37 has a fix for the onSwiped[direction]'s

@hartzis
Copy link
Collaborator

hartzis commented May 10, 2016

I'm hoping #37 fixes this issue, please let me know if it still exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants