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

[Android] Fix `Hover` blocking scrolling with mouse wheel #3067

Closed m-bert closed 2 months ago

m-bert commented 2 months ago

Description

This PR fixes issue in which Hover gesture blocks mouse wheel scroll. At first I thought that we should mark Hover as simultaneous with ScrollView (or to be more precise, NativeViewGestureHandler that wraps ScrollView), but it turned out that it was not the case. Instead of working simultaneous with ScrollView, we have to set this relation with RootViewGestureHandler.

Fixes #3064

Test plan

Tested on code from issue ```tsx import { Text, SafeAreaView, StyleSheet, StatusBar, Pressable, } from 'react-native'; import { GestureHandlerRootView, ScrollView, Gesture, GestureDetector, } from 'react-native-gesture-handler'; import { useSharedValue } from 'react-native-reanimated'; export default function App() { return ( item item item item item item item item item item
proohit commented 2 months ago

I can confirm this fix works for my specific case.