Skip to content

GestureDetector breaks vertical scrolling on Android (works fine on iOS) #3809

@Yandamuri

Description

@Yandamuri

Description

When using GestureDetector from react-native-gesture-handler to wrap my app’s router or layout, vertical scrolling (ScrollView / FlatList) becomes unresponsive on Android.
The same code works perfectly on iOS — the issue appears only in an Expo managed app on Android.

Steps to reproduce

  1. Wrap the root view as shown below

     const swipe = Gesture.Pan().onEnd(event => {
           if (IS_IOS && event.translationX < -50 && event.translationY < 100) navigate(-1)
      });
    
    
    <GestureDetector gesture={swipe}>
     	<View style={{ flex: 1 }} collapsable={false}>
     		<App />
     	</View>
     </GestureDetector>
    
  2. Then you can witness what ever the ScrollView or FlatList inside the app will stop Working in Android.

A link to a Gist, an Expo Snack or a link to a repository based on this template that reproduces the bug.

const swipe = Gesture.Pan().onEnd(event => { if (IS_IOS && event.translationX < -50 && event.translationY < 100) navigate(-1) }); <View style={{ flex: 1 }} collapsable={false}>

Gesture Handler version

2.28.0

React Native version

0.81.4

Platforms

Android

JavaScript runtime

Hermes

Workflow

Using Expo Prebuild or an Expo development build

Architecture

New Architecture (Fabric)

Build type

Debug mode

Device

Real device

Device model

Pixel 7A

Acknowledgements

Yes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions