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(iOS): fix quick modal presentation sequence where foreign modal is being dismissed #2671

Merged
merged 3 commits into from
Feb 6, 2025

Conversation

kkafar
Copy link
Member

@kkafar kkafar commented Feb 6, 2025

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:

  • Modal screen in Example PR
  • Test2048 PR
  • Test1829 PR
  • Test1299 PR

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

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

Copy link
Member Author

@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.

Note

We need to automate these and regression test everything that can be tested 😅

@kkafar kkafar merged commit 17dba4b into main Feb 6, 2025
5 checks passed
@kkafar kkafar deleted the @kkafar/2668-ios-modal-dismiss branch February 6, 2025 13:13
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.

iOS Modal dismiss causes strange navigation stack pop
1 participant