question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(5.x) preventDefaultTouchmoveEvent (Mobile Safari?)

See original GitHub issue

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 with onSwipedLeft and onSwipedRight and everything else default. Seeing same behavior in the example actually; any ideas or anyone else experiencing this?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
hartziscommented, Mar 21, 2019
  • found small bug with #131
  • created fix #132
  • published fix as react-swipeable@5.1.0-alpha.2

Still on target to release 5.1.0 this week.

1reaction
hartziscommented, Mar 13, 2019

What we’ve discovered so far:

  • only affecting safari from what i can tell
  • appears related to v5’s change to how it listens to touchmove events
  • Attaching touchmove to document appears to work fine for chrome, though there are some events that throw warnings #128

Bug report(s) from around the web:

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling Events - Apple Developer
You can disable the default browser behavior by sending the preventDefault message to the event object.
Read more >
Preventing touchmove events in a <video> element in Mobile ...
I am writing a home-screen web app with a video element in Mobile Safari. For usability reasons, I would prefer that swiping on...
Read more >
Touch events - Web APIs - MDN Web Docs - Mozilla
This calls event.preventDefault() to keep the browser from continuing to process the touch event (this also prevents a mouse event from also ...
Read more >
Making touch scrolling fast by default - Chrome Developers
We know that scrolling responsiveness is critical to the user's engagement with a website on mobile, yet touch event listeners often cause ...
Read more >
184250 – Unable to call event.preventDefault in dynamically ...
I can confirm this for: - Safari 11.3 on Mac OS X 10.13.3 - Safari 11.3 on iOS 11.3 Any drag and drop...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found