Skip to content

Experimental pointer events conflicting with bottom-sheet gestures #50024

@axyz

Description

@axyz

Description

When experimental pointer events are enabled (https://reactnative.dev/blog/2022/12/13/pointer-events-in-react-native#enable-feature-flags) and a bottom-sheet is closed via touch gestures (https://github.com/gorhom/react-native-bottom-sheet) the pointer events stop working. (issue happens on both Android and iOS)

Honestly not sure where is the issue between

  • react-native experimental pointer events
  • react-native-gesture-handler
  • the bottom sheet implementation

But maybe you may have some ideas and eventually direct me to culprit.

Thanks.

Related: gorhom/react-native-bottom-sheet#2201
Related: software-mansion/react-native-gesture-handler#3445

Steps to reproduce

  1. yarn && yarn android && yarn start
  2. pressing the "press me" pressable increases both the counters for onPressIn as well as onPointerDown events
  3. close the bottom sheet by dragging the handle or the content of the sheet
  4. now pressing "press me" only increases press events, no pointer events are emitted anymore

Note: if the sheet is close with the "close" button, then the issue does not occur

React Native Version

0.78.0

Affected Platforms

Runtime - Android

Areas

Other (please specify)

Output of npx @react-native-community/cli info

$ npx @react-native-community/cli info
info Fetching system and libraries information...
System:
  OS: Linux 6.8 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
  CPU: (16) x64 AMD Ryzen 7 PRO 4750U with Radeon Graphics
  Memory: 7.95 GB / 30.58 GB
  Shell:
    version: "5.9"
    path: /home/axyz/.nix-profile/bin/zsh
Binaries:
  Node:
    version: 22.8.0
    path: ~/.nvm/versions/node/v22.8.0/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v22.8.0/bin/yarn
  npm:
    version: 10.8.3
    path: ~/.nvm/versions/node/v22.8.0/bin/npm
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
IDEs:
  Android Studio: Not Found
Languages:
  Java: Not Found
  Ruby:
    version: 3.0.2
    path: /bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 19.0.0
    wanted: 19.0.0
  react-native:
    installed: 0.78.0
    wanted: 0.78.0
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: false

Stacktrace or Logs

no error shown in console

Reproducer

https://github.com/axyz/rn-bug-pointer-events-bottom-sheet

Screenshots and Videos

No response

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