Closed hartzis closed 3 years ago
Closing in favor of #240 and maintaining the ease provided by a prop to prevent scrolling.
After having a great discussion with @stefvhuynh about usability and interfaces we decided to move forward with a more user friendly prop that is explicit with it's intent, preventScrollOnSwipe
.
We may also add these event options additionally to provide users with more power, but we can continue to investigate the need for that.
Attempt to remove
preventDefaultTouchmoveEvent
which has always been a very complicated and hard to describe prop and replace it withtouchEventOptions
.Mimicking our good friends over at https://use-gesture.netlify.app/docs/options/#eventoptions
touchEventOptions: AddEventListenerOptions
{ passive: true }
react-swipeable
users more control over the events and when and if they want to call things likeevent.preventDefault
Possible solution for both #224 and #231.
TODOs:
preventDefaultTouchmoveEvent
and examples on how to prevent scrolling via callingevent.preventDefault
in user land manuallyonTap
solution whentrackTouch
andtrackMouse
aretrue