Closed bhj closed 5 years ago
Thank you for posting this issue. I'll try to allocate some time next week to dig into this, but off the top of my head it could be related to the checks here:
NOTE: THIS IS AN IOS/SAFARI ISSUE
More info below in other comments and PRs.
~could add onSwiping={() => {}}
prop to your <Swipeable>
usage along with preventDefaultTouchmoveEvent
and it should work.~
~could also try calling e.preventDefault()
on the event within your code to.~
...
(btw the link to migrations.md in the readme and the "example migration" link in migrations.md are currently borked)
Thank you for pointing this out!
I currently have the same issue 😞
@bhj did you find a workaround?
@bhj @hartzis I'm going to create a PR to fix this issue
@JiiB what are your thoughts on an approach or we can just discuss when the PR is open.
What we've discovered so far:
v5
's change to how it listens to touchmove
events
touchmove
listener directly to the elementtouchmove
listener BEFORE the touchstart event started
touchmove
listener to document nowtouchmove
listener AFTER the touchstart event startstouchmove
to document
appears to work fine for chrome, though there are some events that throw warnings #128 Bug report(s) from around the web:
Essentially the root issue - https://github.com/facebook/react/issues/2043
@JiiB I think i got a better solution after a lot more digging in today.
Please let me know what you think of #131
Also published it as react-swipeable@5.1.0-alpha.1
@hartzis @bhj react-swipeable@5.1.0-alpha.1
works for me. you can now call event.preventDefault()
inside of your onSwiping
handler 👍
@hartzis Alpha is working over here too. Thanks for digging into this!
Thank you @JiiB and @bhj !
I genuinely appreciate you both for testing and verifying the alpha version.
react-swipeable@5.1.0-alpha.2
Still on target to release 5.1.0
this week.
Hi and thanks for all your work.
I can't seem to prevent vertical scrolling during a left/right swipe using
preventDefaultTouchmoveEvent
with 5.x where 4.x works fine (iOS 12.1.4, React 16.8.3). I'm using it withonSwipedLeft
andonSwipedRight
and everything else default. Seeing same behavior in the example actually; any ideas or anyone else experiencing this?