Opening Alert from Action sheet doesn't dismiss it
Short description of the problem:
1: Alert doesn't respond while calling it from the Action Sheet. 2: Action sheet doesn't close after opening an Alert from its handle.
What behavior are you expecting?
Action sheet should be dismissed on click.
Steps to reproduce:
- Create an Action sheet
- Call an Alert from the Action sheet
- Close the alert
Other information: The first issue can be handled by using timeout while presenting the Alert view.
Ionic 2.x
Plunker that shows an example of your issue
For Ionic 2 issues - http://plnkr.co/edit/gRMVtVnLNTRNSvKbtUc1?p=preview
Run ionic info from terminal/cmd prompt: (paste output below)
Cordova CLI: 6.1.1
Gulp version: CLI version 3.8.11
Gulp local: Local version 3.9.1
Ionic Version: 2.0.0-beta.10
Ionic CLI Version: 2.0.0-beta.21
Ionic App Lib Version: 2.0.0-beta.11
OS: Windows 7 SP1
Node Version: v4.2.4
Most likely you need to either close the action sheet before opening the alert, or when closing the alert close the action sheet, all these after the transition has finished.
In current alerts the alert returns a promise that resolves when transition is over, i'm almost always forced to attach a .then() function to my alerts that waits for the close transition to finish and only then pops out the navigation with this.nav.pop() or go to a root page as this.nav.setRoot(RootPage).
Hello @Jai-Krish , thanks for opening an issue with us! I have made a plunker here that shows the correct way to do this. Because all our navigation is async you have to use promises when opening and closing multiple overlay components. Thanks for using Ionic!
Damn that's a better explanation, i suck at explaining things, as @jgw96 said if you don't account for the async navigation transitions things break bad.
Thank you @jgw96 & @Luchillo