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
6.13k stars 982 forks source link

Fix `ScrollView` intercepting touches through out-of-bounds children #3017

Closed j-piasecki closed 3 months ago

j-piasecki commented 3 months ago

Description

In https://github.com/facebook/react-native/pull/43464 clipChildren started being set to false on scrollviews, which caused isViewClippingChildren to return false. Because of this, gesture handler would traverse the children of the scrollview even when touch was out of bounds:

https://github.com/user-attachments/assets/6d108b55-6e06-4202-bc77-9d9dd2825456

This PR adds special cases for scroll views that have overflow set to visible so that scrolling works on all of its children.

Test plan

Test components sample on FabricExample app