Skip to content

TouchableRipple: on Android, a press that disables the touchable leaves its ripple drawn #5267

Closed

Description

@Doberjohn

Current behaviour

On Android, when a press disables a TouchableRipple (for example an onPressIn that sets disabled), the pressed ripple stays drawn after the press ends. It's still there after the touchable is enabled again, and goes only with the next press. This affects everything built on TouchableRipple, such as IconButton. iOS and web leave nothing behind. With the default ripple it's a faint tint; with a strong rippleColor it's plainly visible.

Expected behaviour

No pressed layer once the press ends, as on iOS and web.

How to reproduce?

  1. Render a touchable that disables itself on press-in:
    const [disabled, setDisabled] = React.useState(false);
    
    <TouchableRipple
      rippleColor="rgba(255, 0, 0, 0.5)"
      disabled={disabled}
      onPressIn={() => setDisabled(true)}
      onPress={() => {}}
      style={{ width: 96, height: 96, backgroundColor: '#9E9E9E' }}
    >
      <View />
    </TouchableRipple>
  2. Press it once, then set disabled back to false.
  3. The box stays tinted red (#C0918F instead of #AEAEAE on screen).

What have you tried so far?

TouchableRipple passes android_ripple only while the touchable is interactive (since #5071). React Native clears the native pressed state only in the ripple's own press out, so once the ripple config is gone in the middle of a press, nothing clears it, and the ripple attached again on enable shows it. Keeping android_ripple while disabled fixes it; a disabled view never presses, so it shows nothing.

Your Environment

software version
android 13 (API 33, emulator)
react-native 0.88.1 (New Architecture)
react-native-paper main (86b9988), since #5071
expo sdk 58

Activity

  1. added a commit that references this issue on Nov 20, 2026
    6158ef9
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