Skip to content

Conversation

latekvo
Copy link
Member

@latekvo latekvo commented Aug 20, 2025

Description

This PR fixes the Pressable's onPress callback being called despite the press being cancelled.

Credit for finding and fixing this issue goes to @gigobyte.

Fixes #3609

Test plan

@AfrazHussain
Copy link

Hey @latekvo ,

Thanks for the PR!

Any plans to get this merged? This seems to be a major issue on iOS as mentioned on the comment linked above. I've also applied these changes via a patch file, and all seems to be good for now.

My issue: For me, the issue is when a Pressable component is either in a FlatList or a FlashList. The Pressable component just instantly triggers as soon as I touch the screen to scroll (both on simulator and on a physical device; new arch; iOS-only). It works just fine on Android. Happening since 2.27.0, not before that.

@latekvo latekvo marked this pull request as ready for review September 9, 2025 12:58
@latekvo
Copy link
Member Author

latekvo commented Sep 9, 2025

@AfrazHussain we'll include this fix in the next release. Apologies for the delay.

Copy link
Contributor

@akwasniewski akwasniewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@latekvo latekvo merged commit 18be3b3 into main Sep 9, 2025
1 check passed
@latekvo latekvo deleted the @latekvo/fix-pressable-activation-on-cancellation branch September 9, 2025 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Pressable] onPress is called if user swipes while not lifting finger on iOS
3 participants