Ionic 3 alert view dismiss issue


#1

Hi, when i show the alert view, and i discover i can press other area outside the alert in the page to dismiss the alert, how can i just can dismiss the alert by pressing the OK only?

My code:

let alert = this.alertCtrl.create({
   title: "Internet Connection Problem",
   subTitle:"Please Check Your Network connection",
   buttons: [{
      text: 'Ok',
      handler: () => {
      }
   }]
});
alert.present();

#2

enableBackdropDismiss is documented here.


#3
  let alert = this.alertCtrl.create({
       title : "Internet Connection Problem",
       subTitle : "Please check your network connection",
       buttons : [{
            text : 'Ok',
            handler : () =>{ 
            }
       }],
       enableBackdropDismiss : false
    });
    alert.present();

#4

Thanks~Sidharth_1999