Skip to content

[Android] RNGH's LongPress Detection disrupts ScrollView (and AndroidX.ViewPager2, likely any Scrollable?) Swipe Gesture #3918

@DmitriyGalyanov

Description

@DmitriyGalyanov

Description

I initially reported this Issue in react-native-pager-view, but already closed as I found it's not scoped to PagerView exclusively

Starting RNGH LongPress while scrolling non-RNGH Scrollable disrupts Scrollable Control

Possibly it disrupts any long-lasting non-RNGH Gesture, I didn't check yet

Steps to reproduce

  1. Start swiping through ReactNative.ScrollView with pagingEnabled set to true (or react-native-pager-view.PagerView, which uses AndroidX.ViewPager2 under the Hood)
  2. LongPress at a ReactNativeGestureHandler's GestureDetector configured to handle LongPresses
  3. Swipe Gesture loses Control over Scrolling, but Scrollable doesn't recognize it
  • in case of AndroidX.ViewPager2 its ViewPager2.OnPageChangeCallback.onPageScrollStateChanged doesn't get called AND Pager stays in dragging State, not settling (till next Swipe Gesture or Tab Press)
  • in case of ReactNative.ScrollView its onScrollEndDrag doesn't get called AND Snap-to-Page doesn't occur (till next Swipe Gesture)

[Videos are below]

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

In first Repro I'm using React Navigation's MaterialTopTabNavigator for simplicity, but Issue lays in ViewPager2
In second Repro I'm using ReactNative.ScrollView

Messages are shown for LongPresses to be easily noticeable, LongPress' Handlers might be empty

Repro with PagerView

FILE.2026-01-14.18.36.41.mp4

Repro with ReactNative.ScrollView

FILE.2026-01-15.15.04.47.mp4

Gesture Handler version

2.27.2

React Native version

0.80.2

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

New Architecture (Fabric)

Build type

None

Device

Real device

Device model

Pixel 6a (Android 16)

Acknowledgements

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Platform: AndroidThis issue is specific to AndroidRepro providedA reproduction with a snack or repo is provided

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions