Bug with Alert

This is a bug in both Ionic 1 and 2.

If an Ionic Alert is created while one is already visible, it is impossible to close them.

An example use case it that I display an alert once an async image upload has completed. If I upload more than one image then I could have more than one Alert created.

Native alerts can overlay each other and all be closed.

1 Like

I think toasts are a much better choice here than alerts.

Looking at the Ionic 2 docs I tend to agree with you here, especially since you can add buttons to them!

However I would still consider this a bug with alerts and I think it should be possible to display and close multiple alerts like you can with the Ionic toasts and native alerts

We’ll have to agree to disagree on that. As a user, I would find multiple alerts jarring. An alert says to me “sorry for interrupting your ordinary use of this application, but something really urgent requires your immediate attention. as soon as you take care of this, i promise i’ll let you get right back to what you were doing”. Multiple alerts being open or stacked at the same time breaks that contract, and after I’ve clicked “OK” on four of them, I’ve lost my train of thought, gotten frustrated and am looking to uninstall the app. A toast I can pay as much attention to as I want to, and if I’m concentrating on something, it doesn’t interrupt me as intrusively.