ios: cannot dismiss Modal
See original GitHub issuePlease provide all the information requested. Issues that do not follow this format are likely to stall.
Description
When modal is dismissed the whole screen turns black. see video
React Native version:
System:
OS: macOS 11.6
CPU: (8) x64 Apple M1
Binaries:
Node: 14.15.4 - /usr/local/bin/node
npm: 7.6.3 - /usr/local/bin/npm
Watchman: 4.9.0 - /opt/homebrew/bin/watchman
IDEs:
Android Studio: Not Found
Xcode: 13.0/13A233 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_302 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: ~0.66.0 => 0.66.0
react-native-macos: Not Found
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
- use this code with react native 0.66 on iOS
RCTModalHostViewController is what’s blocking the screen
.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:29
- Comments:68 (2 by maintainers)
Top Results From Across the Web
Cannot dismiss Modal in swift - Stack Overflow
I have an issue dismissing Modal ViewController in swift. When I call the code below nothing happens: confirmPopup.dismiss(animated: true, ...
Read more >iOS Lifecycle When Dismissing a Modal View With ...
If the property is true , the view, which is displayed onscreen modally, is prevented from being dismissed. In other words, the modal...
Read more >ion-modal: Ionic Mobile App Custom Modal API Component
ion-modal is a dialog that appears on top of mobile app content, and must be dismissed before interaction resumes. Learn more about custom...
Read more >iOS 14 (SwiftUI) Sheet Modals not … | Apple Developer Forums
Sometimes the modals act perfectly as usual · Sometimes (most of the time) I have to kill the app because the modal is...
Read more >Dismissing a SwiftUI modal or detail view - Swift by Sundell
So that's three different ways to dismiss a SwiftUI modal or detail view — two of which that are backward compatible with iOS...
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
Another update – Here’s what I ended up doing:
This seemed to work, though I’m not sure why wrapping it with a View with flex: 1 is needed 🤔
I also then noticed that if I have multiple modals on the same page, this issue is only fixed for the first one (likely because of the
flex: 1
). So I updated the code to beThat way the modals are only rendered when visible, and there’s only 1 modal on a page at a time.
This has solved my issue for now, but I wish I didn’t have to do all this. Really hoping this issue is looked into.
Hello, Version 2.2.3 of react-reanimated seems to fix the issue on our side. Regards