Modals don't close on iOS when navigating to a screen with presentation 'push'
See original GitHub issueDescription
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:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
@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.