-
-
Notifications
You must be signed in to change notification settings - Fork 537
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
When using nested, native-stack navigators, a modal screen in the inner navigator cannot push a modal screen in the outer navigator #1829
Labels
Area: Modal
Issue related with iOS modal stack presentation
Platform: iOS
This issue is specific to iOS
Repro provided
A reproduction with a snack or repo is provided
Comments
github-actions
bot
added
Repro provided
A reproduction with a snack or repo is provided
Platform: iOS
This issue is specific to iOS
labels
Jul 15, 2023
When I do nest modals (on the same navigator), the nested modals do seem to be working! 🤔 |
2 tasks
kkafar
added a commit
that referenced
this issue
Dec 7, 2023
## Description Closes #1829 Currently it is not possible to navigate to a modal from another modal view that is mounted in JS under nested stack (see #1829 description for better context). This is the case, because modal is presented by `RNSNavigationController` corresponding to the stack under which it is mounted in JS ==> UIKit reports that such controller is already presenting. IMO the last presented modal should be the one, to present new one. ## Changes Added code handling above case, by checking whether modals from other stacks are present & using top-most modal for presentation in such case. ## Test code and steps to reproduce See `Test1829` in test example apps ## Checklist - [x] Included code example that can be used to test this change - [x] Ensured that CI passes (merged only comments after final CI checks)
2 tasks
kkafar
added a commit
that referenced
this issue
Apr 27, 2024
## Description Basically this is another edition of the issue #1829 (handled by #1912). The issue comes down to the fact, that our `ScreenStack` is not aware of all modal view controllers being in presentation, but this time it is not aware of third-party modal view controllers (I've named them "foreign" modals in opposite to "owned" modals). This PR is not a comprehensive solution but rather just a patch aiming at fixing one particular interaction reported in #2048. I've left verbose code comments explaining the issue and suggesting solution in the source code, including: ``` // TODO: Find general way to manage owned and foreign modal view controllers and refactor this code. Consider building // model first (data structue, attempting to be aware of all modals in presentation and some text-like algorithm for // computing required operations). ``` Closes #2048 Closes #2085 ## Changes Trigger dissmisal of foreign modal if it is presented above `changeRoot` modal (last modal that is to stay on stack after the updates). ## Test code and steps to reproduce `Test2048` in `TestsExample` & `FabricTestExample`. ## Checklist - [x] Included code example that can be used to test this change - [x] Ensured that CI passes
ja1ns
pushed a commit
to WiseOwlTech/react-native-screens
that referenced
this issue
Oct 9, 2024
…ansion#1912) ## Description Closes software-mansion#1829 Currently it is not possible to navigate to a modal from another modal view that is mounted in JS under nested stack (see software-mansion#1829 description for better context). This is the case, because modal is presented by `RNSNavigationController` corresponding to the stack under which it is mounted in JS ==> UIKit reports that such controller is already presenting. IMO the last presented modal should be the one, to present new one. ## Changes Added code handling above case, by checking whether modals from other stacks are present & using top-most modal for presentation in such case. ## Test code and steps to reproduce See `Test1829` in test example apps ## Checklist - [x] Included code example that can be used to test this change - [x] Ensured that CI passes (merged only comments after final CI checks)
ja1ns
pushed a commit
to WiseOwlTech/react-native-screens
that referenced
this issue
Oct 9, 2024
…mansion#2113) ## Description Basically this is another edition of the issue software-mansion#1829 (handled by software-mansion#1912). The issue comes down to the fact, that our `ScreenStack` is not aware of all modal view controllers being in presentation, but this time it is not aware of third-party modal view controllers (I've named them "foreign" modals in opposite to "owned" modals). This PR is not a comprehensive solution but rather just a patch aiming at fixing one particular interaction reported in software-mansion#2048. I've left verbose code comments explaining the issue and suggesting solution in the source code, including: ``` // TODO: Find general way to manage owned and foreign modal view controllers and refactor this code. Consider building // model first (data structue, attempting to be aware of all modals in presentation and some text-like algorithm for // computing required operations). ``` Closes software-mansion#2048 Closes software-mansion#2085 ## Changes Trigger dissmisal of foreign modal if it is presented above `changeRoot` modal (last modal that is to stay on stack after the updates). ## Test code and steps to reproduce `Test2048` in `TestsExample` & `FabricTestExample`. ## 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
Area: Modal
Issue related with iOS modal stack presentation
Platform: iOS
This issue is specific to iOS
Repro provided
A reproduction with a snack or repo is provided
Description
Screen.Recording.2023-07-14.at.11.58.46.PM.mov
I admit that this wording is a little confusing but let me try to explain what's going on. This seems to affect iOS only.
In the demo snack, I expect to be able to launch the "outer modal" -- the screen with name
modal
-- in the outer navigator from any other screen in this app. For example:modal
from the starting screenhome
.modal
from the inner navigator base screen,base
.However, I am unable to navigate to
modal
frominner-modal
.This is unexpected because if I were to remove the
presentation: modal
frominner-modal
, thenmodal
would pop-up normally. In addition, ifinner-modal
were in the same navigator asmodal
, then it would work, as evidenced bymodal
being able to navigate to `modal-2.In addition, after this occurs, nothing is able to launch
modal
anymore, including the buttons which worked before!Steps to reproduce
Snack or a link to a repository
https://snack.expo.dev/fnbHe-IiWz
Screens version
3.18.0
React Native version
0.70.0
Platforms
iOS
JavaScript runtime
Hermes
Workflow
None
Architecture
Paper
Build type
None
Device
None
Device model
No response
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: