-
Notifications
You must be signed in to change notification settings - Fork 24.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple Alerts stacked on iOS instead of being replaced #14873
Comments
I always thought this was expected iOS behaviour. Agreed it's annoying as you can't have the same code base to handle alerts. |
This does not look like an expected behaviour |
Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally! If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:
If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution. |
Seems like it should remain open, this is definitely a bug. |
Is there a way to close old Alert before showing the new one ? |
Is this a bug report?
Yes
Have you read the Bugs section of the Contributing to React Native Guide?
yes
Environment
react-native-cli: 1.0.0
react-native: 0.43.4 (simulator screenshots) and 0.45.1 (Expo demo)
node: v7.7.4
npm: 4.1.2
Then, specify:
Steps to Reproduce
Displaying successive Alerts on iOS leads to an overlay (multiple Alerts displayed, you need to click them one by one to get back to the app)
Expected Behavior
On Android, if an Alert is already displayed when calling
Alert.alert
the new Alert replace the previous one. It should be the same on iOS since there is no way to delete / cancel alert without pressing the buttons on it.Actual Behavior
Alerts are stacked on iOS instead of being replaced when a new one is created, both on simulator and on device, even build with a release scheme.
Reproducible Demo
I've setup an Expo project here: run it on iOS to reproduce the bug.
https://github.com/weassur/RNAlertBug
and a snack:
https://snack.expo.io/rynGz03N-
there are no dependencies other than to the Alert API
The text was updated successfully, but these errors were encountered: