Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nav.pop()/remove() etc. does not call onDidDismiss() #8223

Closed
manucorporat opened this issue Sep 26, 2016 · 2 comments · Fixed by #9473
Closed

Nav.pop()/remove() etc. does not call onDidDismiss() #8223

manucorporat opened this issue Sep 26, 2016 · 2 comments · Fixed by #9473
Assignees
Milestone

Comments

@manucorporat
Copy link
Contributor

manucorporat commented Sep 26, 2016

Dismissing modals, alerts, toasts or actionsheets by interacting directly with the NavController causes onDidDismiss() and onWillDismiss() to not be called.

Should we move the callbacks from ViewController.ts

  dismiss(data?: any, role?: any, navOptions: NavOptions = {}): Promise<any> {
    let options = merge({}, this._leavingOpts, navOptions);
    this._onWillDismiss && this._onWillDismiss(data, role);
    if (!this._nav) {
      return Promise.resolve();
    }
    return this._nav.remove(this._nav.indexOf(this), 1, options).then(() => {
      this._onDidDismiss && this._onDidDismiss(data, role);
      this._onDidDismiss = null;
      return data;
    });
  }

to: nav-controller-base.ts ?

Use case, while trying to fix this issue #8219, I found out that this.nav.popAll() does not call the mentioned callbacks.

ping @adamdbradley @brandyscarney

@manucorporat
Copy link
Contributor Author

manucorporat commented Dec 2, 2016

This is very important to be fixed as soon as possible. With android go back button working properly this issue is more important than ever.

ping @adamdbradley @brandyscarney

@manucorporat manucorporat changed the title Modal.dismissAll() does not call onDidDismiss() Nav.pop()/remove() etc. does not call onDidDismiss() Dec 2, 2016
manucorporat added a commit to manucorporat/ionic that referenced this issue Dec 2, 2016
manucorporat added a commit to manucorporat/ionic that referenced this issue Dec 2, 2016
@manucorporat manucorporat added this to the 2.0.0-rc.4 milestone Dec 3, 2016
manucorporat added a commit to manucorporat/ionic that referenced this issue Dec 3, 2016
@ionitron-bot
Copy link

ionitron-bot bot commented Sep 6, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants