Skip to content

When using nested, native-stack navigators, a modal screen in the inner navigator cannot push a modal screen in the outer navigator #1829

@tpcstld

Description

@tpcstld

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:

  • I can navigate to modal from the starting screen home.
  • I can navigate to modal from the inner navigator base screen, base.

However, I am unable to navigate to modal from inner-modal.

This is unexpected because if I were to remove the presentation: modal from inner-modal, then modal would pop-up normally. In addition, if inner-modal were in the same navigator as modal, then it would work, as evidenced by modal 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

  1. Open the snack; iOS simulator
  2. Open the Inner Navigator
  3. Open the Inner Modal
  4. Try to open the Outer Modal from the Inner Modal
  5. Observe that it does not work.

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

Metadata

Metadata

Assignees

Labels

Area: ModalIssue related with iOS modal stack presentationPlatform: iOSThis issue is specific to iOSRepro providedA reproduction with a snack or repo is provided

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions