v2:bug(modal,alerts) modals and alerts sometimes don't dismiss properly
Short description of the problem:
If I open and dismiss an alert on a page and then open and dismiss a modal I sometimes can't click on any button in <ion-content> on the page any more. I can't figure out exactly when this will happen but under some timing condition this issue occurs.
Sometimes I have to open/dismiss dialog and alert multiple times in sequence until this issue occurs. Sometimes I'm not able to interact with the content of the alert or modal either.
But clicking on a item in the toolbar will still work. But when a click on a toolbar item that will open an alert I can't interact with this alert.
This issue was discovered on an iPhone 6 with iOS 9.3.2. I can't reproduce this issue on two other android devices or on the desktop.
What behavior are you expecting?
A dismissed modal or alert should not blocking clicks on ion-content
Steps to reproduce:
- Create a page with a button that open an alert and a button that will open a modal
- click one of the button to open the alert
- dismiss alert (seems doesn't matter with button click or on backdrop)
- open the modal and dismiss them
- maybe repeat steps 2-4
Which Ionic Version? 2.0.0-beta.10
Run ionic info from terminal/cmd prompt: (paste output below)
Cordova CLI: 6.2.0 Gulp version: CLI version 3.9.1 Gulp local: Local version 3.9.1 Ionic Framework Version: 2.0.0-beta.10 Ionic CLI Version: 2.0.0-beta.30 Ionic App Lib Version: 2.0.0-beta.16 OS: Distributor ID: Debian Description: Debian GNU/Linux 8.5 (jessie) Node Version: v5.12.0
Hello, thanks for opening an issue with us! Would you be able to provide a plunker that demonstrates this issue? Thanks for using Ionic!
I think there are several issues, but I'm not able to create a plunkr that will reproduce this issue. One part of the issue is maybe the Backdrop because I can't scroll when the issue appears.
In backdrop.ts#L45 in ngOnDestroy you preventing the the backdrop count to decrease multiple times with the this.pushed guard. But according to this issue https://github.com/angular/angular/issues/6782 ngOnInit can also be called multiple times.
Thanks for all the info. I am testing this on all my devices, including an iphone 5 on ios 9.3.2, a Nexus 6 running the latest Android N Beta and a Nexus 7 2013 running Android 6.0.1 (the latest stable Android) and i cant seem to repro this issue. If you could get me a minimal example that i can use to reproduce this issue that would be great! A repo will work if you cannot reproduce it in a plunker.
Hello all! As it seems it has been a while since there was any activity on this issue i will be closing it for now. Feel free to comment if you are still running into this issue. Thanks for using Ionic!
I'm getting a similar issue, but when I open an alert from a modal.
Specifically, it only happens when I close the alert by clicking outside the alert box. I don't have the error when I dismiss the alert with the ok button.
Doing this creates a similar problem: the user can no longer interact with the ion-content that they see. It's as if the alert isn't being dismissed correctly.
I'm working from a beta 10.5ish so it could be that. I'll see if the issue is still present when I update to beta 11.