Skip to content

Expose native visual pressed state for custom animations inside scroll views #4515

Description

@BenedictP

Description

Description:

We’re using Gesture Handler’s ScrollView and Touchable with a custom press animation. We want our custom animation to follow the platform’s native touch handling: defer feedback while a touch may become a scroll, and cancel feedback when scrolling takes over.

Observed behavior

On Android, onPressIn can fire before the native view enters its visual pressed state. Starting our custom animation from this callback therefore briefly animates the button when the user intends to scroll, even with delaysChildPressedState enabled.

Desired behavior

We think this is a bug and the native press feedback and a custom animation should start and be canceled in the same way.

Reproduction

Standalone example and instructions

  • Deferral ON, native scale OFF: reproduces the custom-animation mismatch.
  • Both ON: compares against the built-in native animation.

Here is a video: As you can see, the custom animation triggers always when we use a custom animation and not the built-in native animation.

Screen.Recording.2026-09-14.at.16.29.00.mov

Steps to reproduce

  1. Place a Touchable inside Gesture Handler’s ScrollView with delaysChildPressedState enabled.
  2. Drive a custom scale animation through onPressIn and onPressOut.
  3. Start a scroll with your finger initially over the touchable.
  4. Observe that the custom animation can begin before the scroll takes over.

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

https://gist.github.com/BenedictP/807f9e37b25760be47bae45fba213d6e

Gesture Handler version

3.2.1 & 3.3.0

React Native version

0.87

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

New Architecture (Fabric)

Build type

Debug mode

Device

Android emulator

Device model

No response

Acknowledgements

Yes

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions