Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit removes $ionicModal.stack.isHighest check before removing a popup. This recently added check does not seem to have any purpose and it actually breaks programmatically closing popups, if they are not at the top of the stack.
This commit also introduces a delay to hiding the top popup on the stack before showing the new one. Without timeout, if multiple popups are fired within config.showPushDelay, their hide() methods are called before their show() methods due to timeout applied to showing them. So all of them end up being "shown" at the same time. Purpose of "config.showPushDelay" is not clear from the code, and removing it altogether can also fix the issue but I didn't want to mess with it.
This along with the recently merged PR (#4118) should close multiple issues:
#4061
#4304
#4339
#4486
#4299