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.

Modals don't close on iOS when navigating to a screen with presentation 'push'

See original GitHub issue

Description

When navigating to TestScreen from another screen that has a formSheet presentation the form sheet/modal does not close upon navigation. Is this expected behaviour? And how can I fix it?

Code

              <RootStack.Navigator
                screenOptions={{
                  stackPresentation: 'formSheet',
                }}
              >
                <RootStack.Screen
                  name="Test"
                  component={TestScreen}
                  options={{
                    stackPresentation: 'push',
                  }}
                />
              </RootStack.Navigator>

Package versions

  • React: 16.13.1
  • React Native: 0.63.3
  • React Native Screens: 2.10.1+

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
WoLewickicommented, Nov 25, 2020

Oh, if you are using Expo, you should stay with the version that is provided by Expo, otherwise, you can have problems with the integration of the JS and native side. It is better just to apply this one commit since it only changes types.

0reactions
nimabrownleecommented, Nov 25, 2020

@WoLewicki Also expo complains that 2.15.0 is incompatible with other packages and that I should downgrade. I will post a repo in the following days when I can find time in the work schedule. Thanks for the help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[iOS]: presentation: 'modal' in native-stack locks navigation ...
After we close modal screen with gesture and try to open another modal fast enough navigation within the stack locks and does not...
Read more >
Disable the interactive dismissal of presented view controller
All view controllers in your navigation stack will then be full screen and will not be able to be dismissed by the user....
Read more >
iOS 14 (SwiftUI) Sheet Modals not … | Apple Developer Forums
Sometimes a modal is automatically (non-desired) closed right after it opens, and after that, the modal works fine (and so it is not...
Read more >
Opening a modal - React Navigation
The modal behavior slides the screen in from the bottom and allows the user to swipe down from the top to dismiss it...
Read more >
Modal | React Native Navigation
While iOS devices don't have a hardware back button, PageSheet modals can be dismissed by swipe gesture from the top of the screen....
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