Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: canceled swipe gesture on iOS 12 when direction hasn't changed #1150

Merged
merged 3 commits into from
Sep 24, 2021

Conversation

kacperkapusciak
Copy link
Member

Description

Setting up the default value for direction in native stack v6 revealed an issue with a swipe gesture on iOS 12.

Setting direction with the same value twice cancels the transition between screens in iOS 12.

This issue doesn't occur on iOS 13+ because Apple reimplemented how the gesture system works.

Fixes #1091

Changes

  • Added check and set direction in RNScreenStackHeaderConfig only when it changed

Screenshots / GIFs

Before

RPReplay_Final1632394072.MP4

After

RPReplay_Final1632401799.MP4

Test code and steps to reproduce

Test1091.tsx in TestsExample project

Checklist

  • Included code example that can be used to test this change
  • Ensured that CI passes

@kacperkapusciak kacperkapusciak changed the title fix: canceled swipe gesture on iOS 12 when direction changed fix: canceled swipe gesture on iOS 12 when direction hasn't changed Sep 23, 2021
@kacperkapusciak kacperkapusciak merged commit 611ea5a into master Sep 24, 2021
@kacperkapusciak kacperkapusciak deleted the @kacperkapusciak/swipe-back-ios-12 branch September 24, 2021 06:42
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.

Swipe to go back gesture does not work consistently on iOS 12
2 participants