Skip to content

fix(iOS): fix quick modal presentation sequence where foreign modal is being dismissed - #2671

Merged
kkafar merged 3 commits into
mainfrom
@kkafar/2668-ios-modal-dismiss
Feb 6, 2025
Merged

kkafar merged 3 commits into
mainfrom
@kkafar/2668-ios-modal-dismiss

Conversation

@kkafar

@kkafar kkafar commented Feb 6, 2025 •

Copy link
Copy Markdown
Member

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

@kkafar kkafar left a comment

Copy link
Copy Markdown
Member Author

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