Stacked alerts not dismissing after 3.5.0


#1

Opening an alert immediately after an alert closes causes the previous to not dismiss.
The result is, the alerts seem to to Stack.

Prior to 3.5.0 the following was working:

alertOne() {
    let alert = this.alertCtrl.create({
      title: "Alert One",
      subTitle: 'Okay should open the second alert',
      buttons: [
        {
          text: 'Cancel',
          role: 'cancel',
          handler: data => {
            console.log('No clicked');
          }
        }, {
          text: 'Okay',
          handler: data => {
            this.alertTwo();
          }
        },
      ]
    });
    alert.present();
  }

  alertTwo() {
    let alert = this.alertCtrl.create({
      title: "Alert Two",
      subTitle: 'Okay should open the third alert',
      buttons: [
        {
          text: 'Cancel',
          role: 'cancel',
          handler: data => {
            console.log('No clicked');
          }
        }, {
          text: 'Okay',
          handler: data => {
            this.alertThree();
          }
        },
      ]
    });
    alert.present();
  }

alertThree() {
    let alert = this.alertCtrl.create({
      title: "Alert Three",
      subTitle: 'Okay should open the first alert',
      buttons: [
        {
          text: 'Cancel',
          role: 'cancel',
          handler: data => {
            console.log('No clicked');
          }
        }, {
          text: 'Okay',
          handler: data => {
            this.alertOne();//will loop
          }
        },
      ]
    });
    alert.present();
  }

A temporary solution is to put a setTimeout on the handler: ( yaya - I know )

setTimeout(() => {
      this.alertThree();
    }, 100);

#2

If this is new and unwanted behaviour: https://github.com/ionic-team/ionic/issues


#3

I will wait and see if anyone else experiences this and has an alternative solution. Or if I was just plain doing something wrong from the get-go.