Skip to content

TouchableRipple: on web the ripple sets an invalid transitionProperty #5369

Backlog

Description

@Doberjohn

Current behaviour

On web, the ripple span sets transitionProperty: 'transform opacity' (src/components/TouchableRipple/TouchableRipple.tsx, in handlePressIn). Without a comma that isn't valid CSS, so the browser drops it: in Chrome the inline value stays empty and the computed transition-property is all.

Nothing looks wrong today, since all covers transform and opacity too, but the ripple transitions any property that changes, not only those two.

Expected behaviour

transitionProperty: 'transform, opacity', which Chrome keeps as set.

How to reproduce?

In the browser console:

const span = document.createElement('span');
document.body.appendChild(span);
span.style.transitionProperty = 'transform opacity';
[span.style.transitionProperty, getComputedStyle(span).transitionProperty];
// ['', 'all']

With 'transform, opacity', both read back as 'transform, opacity'.

Preview

No visible difference.

What have you tried so far?

Checked the value in Chrome only. The fix is the missing comma.

Your Environment

software version
ios not affected
android not affected
react-native 0.88.1
react-native-paper main at c05552f
node 24.13.0
npm or yarn yarn 4.9.1
expo sdk 58 (web, Chrome 156)
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