Skip to content
This repository was archived by the owner on May 4, 2022. It is now read-only.
This repository was archived by the owner on May 4, 2022. It is now read-only.

Alert control is not dismissing after opening from the action sheet button event in Ionic3.5 #31

@ionitron-bot

Description

@ionitron-bot

Ionic version: (check one with "x")
[ ] 1.x (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[ x] 3.x

I'm submitting a ... (check one with "x")
[x ] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
I have an action sheet into my project and opening an alert control by selecting the action sheet button. the alert box open but while clicking the alert button then alert control is not dismissing/closing itself. it always stays on the page.

Expected behavior:
The alert control should be dismissed/close after pressing the Agree/Disagree button.

Steps to reproduce:

  1. add an action sheet into one of ionic page
  2. add the alert control into that page.
  3. open an alert control using action sheet button.
  4. try to close the alert control using one of agree disagree button

Related code:

presentActionSheet() {
     let self = this;
    let actionSheet = this.actionSheetCtrl.create({
      title: 'Modify your album',
      buttons: [
        {
          text: 'Destructive',
          role: 'destructive',
          handler: () => {
            console.log('Destructive clicked');
            self.showConfirm();
          }
        },{
          text: 'Archive',
          handler: () => {
            console.log('Archive clicked');
            self.showConfirm();
          }
        },{
          text: 'Cancel',
          role: 'cancel',
          handler: () => {
            console.log('Cancel clicked');
          }
        }
      ]
    });
    actionSheet.present();
  }
showConfirm() {
  
    let confirm = this.alertCtrl.create({
      title: 'Use this lightsaber?',
      message: 'Do you agree to use this lightsaber to do good across the intergalactic galaxy?',
      buttons: [
        {
          text: 'Disagree',
          handler: () => {
            console.log('Disagree clicked');
            confirm.dismiss();
          }
        },
        {
          text: 'Agree',
          handler: () => {
            console.log('Agree clicked');
             confirm.dismiss();
          }
        }
      ]
    });
    confirm.present();
  }

https://drive.google.com/open?id=0B6aMbU1-vMowSVRvU0JQdk1SZ0U
https://drive.google.com/open?id=0B6aMbU1-vMowRjJQQ0M0R0JtUEU

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

global packages:

@ionic/cli-utils : 1.4.0
Cordova CLI      : 6.5.0 
Ionic CLI        : 3.4.0

local packages:

@ionic/app-scripts              : 1.3.12
@ionic/cli-plugin-cordova       : 1.4.0
@ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms               : android 6.1.2 browser 4.1.0 ios 4.1.1
Ionic Framework                 : ionic-angular 3.5.0

System:

Node       : v7.0.0
OS         : macOS Sierra
Xcode      : Xcode 8.3.1 Build version 8E1000a 
ios-deploy : 1.9.1 
ios-sim    : 5.0.10 
npm        : 4.6.1 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions