Skip to content

Pressables become unresponsive in Android #3735

@Regina-v

Description

@Regina-v

Description

First of all please bear with me, I'm not entirely sure if this is a) a bug in react-native-gesture-handler, b) me doing something stupid or c) a bug in react-native-keyboard-controller.

After running into issues with Pressables from react-native on android using new architecture (facebook/react-native#51621 et al.) we have started using the Pressable from react-native-gesture-handler which thankfully worked fine so far 🙏 . Now a user got into a situation where a snackbar was displayed over a button (RNGH Pressable), they pressed the button underneath while the snackbar was shown, and suddenly all RNGH Pressables in the app stopped working. The only way for the user to "fix" this state was to completely close and re-open the app.

Our snackbar component is wrapped in a KeyboardStickyView from react-native-keyboard-controller so that keyboards can't hide the snackbar. While creating a minimal reproducer for this issue I found that if we would not wrap the snackbar in KeyboardStickyView, the issue is not happening.

Steps to reproduce

  1. Run the reproducer on an android device (Real device! Not reproducible in an emulator).
  2. Press on "Increment" to see that the button/pressable works.
  3. Press on "Show snackbar" to show the snackbar.
  4. While the snackbar is visible, press the "Show snackbar" button again.
  5. When the snackbar is gone, observe that the ripple effect on the "Show snackbar" button is still visible. Don't touch this button.
  6. Press on "Increment" and observe that it's not working anymore.
Screen_recording_20251006_103951.mp4

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

https://github.com/Regina-v/rngh-pressable-keyboard-sticky-view-issue

Gesture Handler version

2.28.0

React Native version

0.81.4

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

New Architecture (Fabric)

Build type

Debug mode

Device

Real device

Device model

Pixel 7 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