Skip to content

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

Closed

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

  1. BenedictP commented on Sep 14, 2026

    @BenedictP
    Author

    PR with another example screen: #4516 feel free to close it after trying it out.

  2. m-bert commented on Oct 8, 2026

    @m-bert
    Collaborator

    Hi @BenedictP! Thank you for pointing out this problem!

    We do want to fix it, but unfortunately the approach proposed in #4516 is not what we would do. To address this issue, I've opened new stack with this PR on top of it - it should fix the problem you've encountered. Let me know if you could check it 😅

  3. BenedictP commented on Oct 12, 2026

    @BenedictP
    Author

    Hi @m-bert, yep, that's ok. The PR was just a further example :) I can later check your fix and report back if it's also working for us.

  4. BenedictP commented on Oct 12, 2026

    @BenedictP
    Author

    Confirmed. The PR fixes the issue within our codebase 🚀

  5. m-bert commented on Oct 12, 2026

    @m-bert
    Collaborator

    Glad to hear that, thank you for confirmation! ❤️

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