question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When navigate to a new screen in transparentModal screen, the new screen is under transparentModal screen

See original GitHub issue

Description

When navigate to a new screen(DetailsScreen) in transparentModal screen(ModalScreen), the new screen(DetailsScreen) is under transparentModal screen(DetailsScreen).

Screenshots

2022-01-31 01-26-31 2022-01-31 01_27_05

Steps To Reproduce

https://snack.expo.dev/@heynext/5b84d0

  1. click Open Modal
  2. click Details

Expected behavior

DetailsScreen on the top

Actual behavior

DetailsScreen is bellow ModalScreen

Reproduction

https://snack.expo.dev/@heynext/5b84d0

Platform

  • iOS
  • Android
  • Web
  • Windows
  • tvOS

Workflow

  • Managed workflow
  • Bare workflow

Package versions

package version
react-native
@react-navigation/native 6.0.2
@react-navigation/native-stack 6.0.5
react-native-screens ~3.8.0
react-native-safe-area-context 3.3.2
react-native-gesture-handler ~1.10.2
react-native-reanimated
expo

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
WoLewickicommented, Feb 3, 2022

Yeah, the nesting part is necessary since we need another navigator higher in the native hierarchy. I will close this issue then. Feel free to comment if something is wrong.

0reactions
heynextcommented, Feb 2, 2022

I think I found another option, which is rendering the containedTransparentModal as a second screen of a nested stack, and since it is contained, it should navigate away when you push next screen in the non-nested stack. Can you check if this resolves your issue?

Yes, I think it does work well. The only thing I care about is that I need put my HomeScreen into a nested stack. I will use this solution, thanks!

image

2022-02-03 00-54-17 2022-02-03 00_54_40

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to give a transparent background to a fullScreen modal in ...
I want a transparent color in a new fullscreen modal which is presented over another screen. const MainNavigator = createStackNavigator( { ...
Read more >
Unable to set transparent modal with blurred background #9934
I want to have transparent background like 'transparentModal' but need to have 'modal' behavior as well (we can dismiss the modal by dragging...
Read more >
Opening a modal - React Navigation
When set to modal , all modal screens animate-in from bottom to top rather than right to left by default.
Read more >
How To Use Opacity and Transparency to Create a Modal in ...
When styling HTML with CSS, opacity can help soften a shadow, ... This will cause the entire modal view to be visually hidden...
Read more >
Modal | React Native Navigation
Showing transparent modals is a nice technique to increase immersiveness while keeping the user in the same context. When a modal is displayed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found