software-mansion / react-native-gesture-handler

Declarative API exposing platform native touch and gesture system to React Native.
https://docs.swmansion.com/react-native-gesture-handler/
MIT License
5.83k stars 952 forks source link

Add `touchAction` prop. #2787

Closed m-bert closed 1 month ago

m-bert commented 1 month ago

Description

This PR adds new prop to gesture handlers - touchAction.

While working on fix scroll interactions PR we've found it difficult to remove touch-action: none; and ensure correct behavior of handlers with scroll, especially with swipeable components. What made it even harder were differences between platforms.

We decided to kill two birds with one stone - give our users possibility to manipulate touchAction, which will also make it easier for us to properly handle scroll.

Test plan

Tested on example app.