iOS: Whiles a Modal is open, first Alert Dialog or ActionSheet shows underneath Modal
See original GitHub issueEnvironment
Environment:
OS: macOS High Sierra 10.13.3
Node: 8.9.4
Yarn: 1.2.1
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.3 Build version 9E145
Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed)
expo: ^25.0.0 => 25.0.0
react: ^16.2.0 => 16.2.0
react-native: https://github.com/expo/react-native/archive/sdk-25.0.0.tar.gz => 0.52.0
Diagnostics report:
https://exp-xde-diagnostics.s3.amazonaws.com/trevorkirpaul-5de24453-f1c5-411c-bbcd-8afe85a8e25b.tar.gz
Target Platform: iOS
Steps to Reproduce
iOS device or iOS simulator only
- Open a modal
- Open an alert
- First alert shows up underneath the modal. All of the following alerts show up as intended, in front of the modal. This issue also happened with actionSheets. That first ‘orphan’ alert will linger behind after the modal is closed.
Expected Behavior
I expect the first modal or actionSheet to be visible and in front of the modal. I also expect it to not linger behind when the modal is closed.
Actual Behavior
First alert that fires will pop up underneath the modal. Following alerts will show up as intended, in front of the modal.
This issue also happens with actionSheets.
Reproducible Demo
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:21 (6 by maintainers)
Top Results From Across the Web
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 >Showing alert in modal view - Stack Overflow
I got it. It wasn't a problem with modal views. The alert gets blocked because the main thread is executing the web service....
Read more >ActionSheetIOS / Alert appear behind Modal - #22 by notbrent
Hello, When I have a Modal open and make calls to Alert or ActionSheetIOS, nothing appears until I close the modal. Then they...
Read more >JavaScript - Bootstrap
Multiple open modals not supported. Be sure not to open a modal while another is still visible. Showing more than one modal at...
Read more >View Controller Presentation Changes in iOS 13
Default Modal Presentation Style Change ... The default presentation is now page sheet, not full screen. The header documentation for modalPresentationStyle says:.
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 Free
Top 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
Hi people!
You can use the Expo Modal API instead of the React Native one, like this: https://snack.expo.io/ByEqo7Bif
I’ll work on getting some documentation up shortly. The main differences between the react-native Modal API and this are:
This issue also happens with
ImagePicker.launchImageLibraryAsync()
andImagePicker.launchCameraAsync()
and occurs with the react-nativeModal
and https://github.com/react-native-community/react-native-modal which is a commonly suggested replacement