Skip to content

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

Closed

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

Activity

  1. m-bert commented on May 7, 2026

    @m-bert
    Collaborator

    Hi @stianjensen! Could you share more details? If you have reproduction that would be great. I've tested it on the code below and it works as expected (both alerts are visible)

    import React from 'react';
    import {
      Alert,
      Pressable as RNPressable,
      StyleSheet,
      Text,
      View,
    } from 'react-native';
    import { Pressable as GHPressable } from 'react-native-gesture-handler';
    
    export default function EmptyExample() {
      return (
        <View style={styles.container}>
          <Text style={styles.label}>GH Pressable (broken)</Text>
          <View pointerEvents="box-none" style={styles.wrapper}>
            <GHPressable
              style={styles.button}
              onPress={() => Alert.alert('GH Pressable', 'onPress fired!')}>
              <Text style={styles.buttonText}>Tap me (GH)</Text>
            </GHPressable>
          </View>
    
          <Text style={[styles.label, styles.labelSpacing]}>
            RN Pressable (works)
          </Text>
          <View pointerEvents="box-none" style={styles.wrapper}>
            <RNPressable
              style={styles.button}
              onPress={() => Alert.alert('RN Pressable', 'onPress fired!')}>
              <Text style={styles.buttonText}>Tap me (RN)</Text>
            </RNPressable>
          </View>
        </View>
      );
    }
    
    const styles = StyleSheet.create({
      container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
      },
      label: {
        fontSize: 16,
        marginBottom: 8,
        fontWeight: '600',
      },
      labelSpacing: {
        marginTop: 32,
      },
      wrapper: {
        borderWidth: 2,
        borderColor: 'red',
        borderStyle: 'dashed',
        padding: 16,
      },
      button: {
        backgroundColor: '#b58df1',
        paddingHorizontal: 24,
        paddingVertical: 12,
        borderRadius: 8,
      },
      buttonText: {
        color: 'white',
        fontSize: 16,
        fontWeight: '600',
      },
    });
  2. self-assigned this
    on May 7, 2026
  3. stianjensen commented on May 7, 2026

    @stianjensen
    Author

    I'm sorry, I don't know what I did wrong last time to not save and share the Expo Snack properly. Here's an updated URL with a working reproduce:
    https://snack.expo.dev/@stiaje-hyre/pointer-events-reproduce-gesture-handler?platform=android

    Note that the problem is only on Android.

    The only difference I can see is that in my reproduce I did include a wrapping GestureHandlerRootView

  4. m-bert commented on May 8, 2026

    @m-bert
    Collaborator

    Hi! I've just created new React Native app (0.83.3) with Gesture Handler 2.31.1 and I still cannot reproduce this issue:

    Screen.Recording.2026-05-08.at.11.01.30.mov

    I'll try it later on expo snack, but I can see that in description you've said that you don't use expo.

  5. stianjensen commented on May 8, 2026

    @stianjensen
    Author

    Yeah, locally I discovered the bug on a vanilla react native project, running on a real device. I just created the expo snack to be able to share.

    With the expo snack I shared, I also reproduced the bug, both in the browser android emulator, and when installing it on a device from that QR code.

  6. m-bert commented on May 8, 2026

    @m-bert
    Collaborator

    Well, I've checked snack and Expo Go. Indeed, it doesn't work on snack. On Expo Go it doesn't work when used with SDK 54, but it works with SDK 55.

    I know you've said that you use RN without expo - would you be able to prepare reproduction that works outside of expo?

  7. stianjensen commented on May 8, 2026

    @stianjensen
    Author

    Thanks for looking into this!

    I've lost some of my original setup from 2 weeks ago now, so I can't verify completely. But I set up a new reproduce locally again with 2.31.1 and I can't reproduce it anymore. Only explanation must be that I somehow managed to still only test on 2.30.x or something.

    And then I guess I've somewhat misunderstood how to set up a proper replication in the Expo snack since there's a native component to the library.

    I created a new reproduce repo locally now and can no longer reproduce the bug on 2.31.1.

    So I guess it is indeed fixed after all then.

    Sorry for the false report!

  8. m-bert commented on May 8, 2026

    @m-bert
    Collaborator

    Sorry for the false report!

    No worries! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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