-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
detachPreviousScreen is not set to false when using "presentation: 'modal'" option #12016
Comments
Hey @IgorVanian! Thanks for opening the issue. It seems that the issue doesn't contain a link to a repro. The best way to get attention to your issue is to provide an easy way for a developer to reproduce the issue. You can provide a repro using any of the following:
A snack link is preferred since it's the easiest way to both create and share a repro. If it's not possible to create a repro using a snack, link to a GitHub repo under your username is a good alternative. Don't link to a branch or specific file etc. as it won't be detected. Try to keep the repro as small as possible by narrowing down the minimal amount of code needed to reproduce the issue. Don't link to your entire project or a project containing code unrelated to the issue. See "How to create a Minimal, Reproducible Example" for more information. You can edit your original issue to include a link to the repro, or leave it as a comment. The issue will be closed automatically after a while if you don't provide a repro. |
Couldn't find version numbers for the following packages in the issue:
Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3. |
The versions mentioned in the issue for the following packages differ from the latest versions on npm:
Can you verify that the issue still exists after upgrading to the latest versions of these packages? |
It doesn't say that it's set to |
Hey! This issue is closed and isn't watched by the core team. You are welcome to discuss the issue with others in this thread, but if you think this issue is still valid and needs to be tracked, please open a new issue with a repro. |
@satya164 thank you for the quick reply.
This clearly states that From my understanding, "to keep the required screens visible" it should adjust |
It keeps the screen that's required to stay visible like it says.
Why exactly should the screen stay visible on Android for modals? On iOS the previous screen is visible underneath when using modal presentation style, and same for transparent modals on both platforms. What's the point of keeping it on Android when it's not even visible underneath? |
Current behavior
Hi!
The docs say that
detachPreviousScreen
is set tofalse
ifpresentation
is set totransparentModal
ormodal
.It seems that it is not the case:
react-navigation/packages/stack/src/views/Stack/CardStack.tsx
Lines 615 to 616 in 25e834b
In my app, it's
true
by default on iOS and the previous screen is visible but on Android the previous screen is not visible.Is it a mistake in the docs or in the code? Should I make a PR with
detachPreviousScreen = options.presentation === 'transparentModal' || options.presentation === 'modal'
?Expected behavior
If the docs are correct,
detachPreviousScreen
should be set tofalse
when usingpresentation: 'modal'
Reproduction
None.
Platform
Packages
Environment
The text was updated successfully, but these errors were encountered: