Skip to content

[Android] Touchable doesn't call onPress when you tap on a TextInput editable={false} child #4622

Open

Description

@gigobyte

Description

Tapping a disabled TextInput doesn't trigger the onPress handler of its wrapping Touchable on Android.

The behaviour of RNGH's Touchable (and therefore Pressable) differs from the default React Native implementation. However, RN itself is inconsistent across iOS and Android, so the behaviour there also varies. Therefore, I'm not sure what is supposed to be the reference behaviour anymore, but what I can say is that it worked in RNGH v2.

Android iOS Web
RN onPress is called onPress is not called onPress is called
RNGH onPress is not called onPress is called 🤯 onPress is called

AI explanation for the default behaviour on Android:

editable={false} becomes setEnabled(false) on the native EditText.
RN's Android hit-testing treats any disabled view as box-none: "Views that are disabled should never be the target of pointer events."
So the TextInput can't be the touch target, the parent Pressable becomes the target, and onPress fires.

AI explanation for the default behaviour on iOS:

editable={false} only turns off editing. The view can still be hit.
The touch lands on the TextInput. TextInput.js attaches its own usePressability handlers whatever editable is (it just skips focus() when non-editable, around line 599).
The TextInput therefore claims the responder, and the parent Pressable never gets it, so it logs nothing.

Steps to reproduce

import { Pressable, TextInput } from 'react-native'
import { Pressable as RNGHPressable, Touchable } from 'react-native-gesture-handler'

<View>
  <Pressable onPress={() => Alert.alert('RN')}>
    <TextInput editable={false} placeholder="tap here" />
  </Pressable>

  <RNGHPressable onPress={() => Alert.alert('RNGH Pressable')}>
    <TextInput editable={false} placeholder="tap here" />
  </RNGHPressable>

  <Touchable onPress={() => Alert.alert('RNGH Touchable')}>
    <TextInput editable={false} placeholder="tap here" />
  </Touchable>
</View>
  1. Tap on the first Pressable - observe "RN" alert
  2. Tap on the secondPressable - observe no alert being shown

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

Gesture Handler version

3.4.0

React Native version

0.86.3

Platforms

Android

JavaScript runtime

None

Workflow

None

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

Activity

  1. github-actions commented on Oct 20, 2026

    @github-actions

    Hey @gigobyte! 👋

    The issue doesn't seem to contain a minimal reproduction.

    Could you provide a snack, a gist or a link to a GitHub repository that reproduces the problem?

  2. github-actions commented on Oct 20, 2026

    @github-actions

    Hey @gigobyte! 👋

    Some of the required information in this issue is missing, incomplete or invalid. Could you take another look at the template and make sure each of these is filled in with something we can act on?

    • Description - what happens, and what you expected to happen instead
    • Steps to reproduce - steps somebody else can follow, not just numbering
    • Gesture Handler version - the exact version from your package.json or lockfile
    • React Native version - the exact version from your package.json or lockfile
    • Versions of related libraries you mention (Reanimated, Worklets, Screens, Expo) - the versions actually installed
    • Platforms - the platforms you actually see the bug on

    Once the issue is updated we will take another look. Thanks!

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

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