Skip to content

Conversation

@kmichalikk
Copy link
Collaborator

Closes https://github.com/software-mansion/react-native-screens-labs/issues/489

Description

This PR addresses the issue that, when using custom PanGestureRecognizer on iOS 26 (for handling custom animations on swipe) with a screen that has a horizontal ScrollView, and when swiping for the second time before the view stopped scrolling, the screen is popped with pan gesture.

Changes

Added check for ScrollGestureRecognizer state=Began in shouldRecognizeSimultaneouslyWithGestureRecognizer to return NO.

before after
sv-custom-horizontal-bad.mov
sv-custom-horizontal-good.mov

-->

Test code and steps to reproduce

Use Test3265 on iOS 26; make sure that the screen has animation set to custom animation and animationMatchesGesture: true.

@kmichalikk kmichalikk changed the title Verify that ScrollView gesture hasn't begun when triggering pan gesture fix(iOS): Verify that ScrollView gesture hasn't begun when triggering pan gesture Oct 2, 2025
Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

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

I approve the native code.
To land this PR we need to add dedicated test case. Let's do it, please.

@kmichalikk kmichalikk requested a review from kkafar October 21, 2025 13:28
Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

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

We need to fix the imports before landing. Other than that 🟢

@kmichalikk kmichalikk force-pushed the @kmichalikk/custom-gesture-recognizer-horizontal-scroll-ios26 branch from b619cff to 9f9dc04 Compare October 24, 2025 09:02
@kmichalikk kmichalikk requested a review from kkafar October 24, 2025 09:02
Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

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

🟢

@kmichalikk kmichalikk merged commit 0dd7d98 into main Oct 24, 2025
6 checks passed
@kmichalikk kmichalikk deleted the @kmichalikk/custom-gesture-recognizer-horizontal-scroll-ios26 branch October 24, 2025 09:04
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.

5 participants