You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Swipes originating from coordinates with x = 0 (left edge) or y = 0 (top edge) will not be captured. I only found this by writing tests against my usage of this library as I believe this behavior is really hard to replicate in real world use cases. It's caused by a improper falsy check on this line: https://github.com/FormidableLabs/react-swipeable/blob/master/src/index.js#L73
As-is, the test passes. But if I change all of the clientX values to 0 (or the initial clientY value to 0), the test fails because no swipe was detected, with the code bailing out in onMove at that if-check.
Expected behavior
Since the screen is a 0-based grid, it seems like touches starting on the edges should be handled?
The text was updated successfully, but these errors were encountered:
Describe the bug
Swipes originating from coordinates with x = 0 (left edge) or y = 0 (top edge) will not be captured. I only found this by writing tests against my usage of this library as I believe this behavior is really hard to replicate in real world use cases. It's caused by a improper falsy check on this line:
https://github.com/FormidableLabs/react-swipeable/blob/master/src/index.js#L73
I think it should be:
Steps or Sandbox to reproduce
In my tests I have
As-is, the test passes. But if I change all of the
clientX
values to 0 (or the initialclientY
value to 0), the test fails because no swipe was detected, with the code bailing out inonMove
at that if-check.Expected behavior
Since the screen is a 0-based grid, it seems like touches starting on the edges should be handled?
The text was updated successfully, but these errors were encountered: