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

[iOS] Fix edge swipe (interactive pop) gesture recognition #1370

Merged
merged 1 commit into from
Mar 25, 2022

Conversation

radex
Copy link
Contributor

@radex radex commented Mar 24, 2022

Description

See video here: https://twitter.com/radexp/status/1506981953156927499

react-native-screens accidentally broke a subtle behavior of the edge swipe/interactive pop gesture recognition. In simple vanilla iOS app, the edge swipe is easily recognized even when touch is panning across a scroll view diagonally or while scroll view is in motion. Because RNS does not have a normal view/view controller hierarchy (or some other subtle reason), the pop gesture breaks.

RNS sets _controller.interactivePopGestureRecognizer.delegate = self; so it's not completely broken… but this subtle behavior was still broken, driving me bonkers over the past couple of years :)

I don't know the true root cause of this issue, this could require deeper changes to RNS, for the default native behavior to just work. Regardless, setting interactive pop gesture recognizer to recognize simultaneously with scroll view's pan gesture recognizer fixes popping, while setting it to fail by scroll view's pan recognizer fixes scroll view still moving together with the edge swipe.

Changes

  • Fix edge swipe (interactive pop) on iOS when dragging diagonally over a scroll view

Test code and steps to reproduce

Checklist

@WoLewicki WoLewicki merged commit ef0e103 into software-mansion:main Mar 25, 2022
@hirbod
Copy link
Contributor

hirbod commented Jul 4, 2022

@WoLewicki @kacperkapusciak I am not sure if this PR is the reason, but since 3.14.1 its impossible to scroll in any screen that has fullScreenGestureEnabled.

@hirbod
Copy link
Contributor

hirbod commented Jul 4, 2022

#1510

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.

3 participants