Skip to content

Pressable wrapped in pointerEvents="box-none" does not work #4109

@stianjensen

Description

@stianjensen

Description

When a plain View with pointerEvents="box-none" contains a Pressable from react-native-gesture-handler, the Pressable does not receive tap events. Replacing it with React Native core's Pressable works as expected under the same parent.

The previously-merged fixes (#3925, #3927) addressed pointerEvents on nested gesture-handler Pressables, but this case — a non-gesture-handler parent using box-none — still reproduces on 2.31.1.

Expected: tapping the gesture-handler Pressable fires onPress, since box-none is supposed to let touches pass through the parent to its children.

Actual: onPress never fires on the gesture-handler Pressable (and you're able to click through to what's behind the button). The core RN Pressable in the same parent works.

Steps to reproduce

  1. Wrap a gesture-handler Pressable in a <View pointerEvents="box-none">.
  2. Tap the Pressable.
  3. Observe that onPress does not fire.
  4. Swap it for RN core Pressable under the same parent and observe it works.

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

https://snack.expo.dev/@stiaje-hyre/pressable-pointer-events

Gesture Handler version

2.31.1

React Native version

0.83.3

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

New Architecture (Fabric)

Build type

Release mode

Device

Real device

Device model

Samsung Galaxy (Android 15)

Acknowledgements

Yes

Metadata

Metadata

Assignees

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