FormidableLabs / react-swipeable

React swipe event handler hook
https://commerce.nearform.com/open-source/react-swipeable
MIT License
2k stars 147 forks source link

Unable to swipe in Safari & Firefox (both on MacBook Pro and iPad) #243

Closed ilkovs closed 3 years ago

ilkovs commented 3 years ago

Describe the bug Swiping doesn't work for Safari & Firefox. While I'm able to swipe in tablet mode in Chrome, the same is not possible in any other browser nor apple device (iPad). I have two other click functions to change to next/prev slide, now adding the swipe functionality for tablets.

I'm testing with pretty basic integration now.

const handlers = useSwipeable({ onSwipedLeft: () => changeIndex(actions.NEXT, null, true), onSwipedRight: () => changeIndex(actions.PREV, null, true), preventDefaultTouchmoveEvent: true, trackTouch: true, trackMouse: true, });

Added the {...handlers} in the parent container that holds all the slides as well. TrackTouch and TrackMouse haven't improved anything as well.

Expected behavior Smooth swipe on any browser/device.

Device/Browser Safari - MacBook Pro (10.14.6 ) and iPad Mini 5th gen

Pangamma commented 3 years ago

Was it fixed?