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: fast ios modal push #1326

Merged
merged 4 commits into from
Feb 28, 2022
Merged

fix: fast ios modal push #1326

merged 4 commits into from
Feb 28, 2022

Conversation

WoLewicki
Copy link
Member

@WoLewicki WoLewicki commented Feb 16, 2022

Description

Fix bug with pushing modals on iOS too fast. See #1299 for more info. It would be nice to test if this new behavior does not introduce unwanted problems around pushing new screens after the dismissal of the modal.

Fixes react-navigation/react-navigation#10324
Fixes #1299

Test code and steps to reproduce

Test1299.tsx.

Checklist

@WoLewicki WoLewicki merged commit dc3d433 into main Feb 28, 2022
@WoLewicki WoLewicki deleted the @wolewicki/fix-ios-fast-modal-push branch February 28, 2022 12:57
kkafar added a commit that referenced this pull request Feb 6, 2025
…s being dismissed (#2671)

## Description

Closes #2668 

See the #2668 for issue description.

Making long story short: The issue involves cases when we have two
modals `A, b`, where `A` is owned and `b` is foreign, and we
dismiss `b` and present another owned modal `B` in single transaction or
in separate transactions but pulled quickly enough so that previous
transitions (caused by previous transaction) are not finished yet.

Currently, because of `b` being dismissed by its host view controller,
we would wrongfully dismiss the controller underneath (`A`). Now the
code takes possibility of `b` being in dismissal into account.

## Changes

We now check whether the potentially foreign modal is being dismissed -
if so, we schedule our updates to run **after** dismissal transition
completes.

## Test code and steps to reproduce

Tested for regressions: 

* [x] `Modal` screen in Example
[PR](#1996)
* [x] Test2048
[PR](#2113)
* [x] Test1829
[PR](#1912)
* [x] Test1299
[PR](#1326)

This issue is quite similar to #1299 but concerns foreign modal not
owned one and mechanism are a bit different, therefore I've added
`Test2668`.

## Checklist

- [x] Included code example that can be used to test this change
- [x] Ensured that CI passes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants