You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TouchableRipple: on Android, a press that disables the touchable leaves its ripple drawn #5267
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?
Render a touchable that disables itself on press-in:
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.
Activity
fix(touchable-ripple): clear a ripple left by a disabling press (call…