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

No Modal Dismiss on setRoot #8734

Closed
n00b42 opened this issue Oct 16, 2016 · 6 comments
Closed

No Modal Dismiss on setRoot #8734

n00b42 opened this issue Oct 16, 2016 · 6 comments

Comments

@n00b42
Copy link

n00b42 commented Oct 16, 2016

Short description of the problem:

  • Assume you have 2 pages and a modal.
  • Then from Page1 we open the Modal.
  • While the modal is still open we issue "setRoot" to Page2 on the root nav.
  • The Modal remains visible and is not dismissed.
    (Page1 is successfully poped and Page2 popped in the "background")

What behavior are you expecting?

As it is stated that a modal is pushed to the nav stack and setRoot is said to destroy elements on the nav stack.
Therefore, I would expect the modal to be dismissed too.

Ionic info

Cordova CLI: 6.3.1
Ionic Framework Version: 2.0.0-rc.1
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
OS: Windows 10
Node Version: v6.7.0

Probably related

#8437

@n00b42
Copy link
Author

n00b42 commented Oct 16, 2016

OT: Is there already a Plunker template for RC0 or RC1?

@manucorporat
Copy link
Contributor

Modals are not longer part of the main stack. You have to pop the modal manually, or activate the dismissOnPageChange setting.

@n00b42
Copy link
Author

n00b42 commented Oct 16, 2016

Thank you for the explanation.

@n00b42
Copy link
Author

n00b42 commented Oct 16, 2016

@manucorporat Actually, there seems to be no "dismissOnPageChange" for Modals, only for Toasts and Loading. At least not within ModalOptions

@manucorporat
Copy link
Contributor

@n00b42 you are right. I think dismissOnPageChange is not available in modal, because pushing a page inside modal would dismiss it.

I would suggest you to manually close the modal when you setRoot.

@n00b42
Copy link
Author

n00b42 commented Oct 16, 2016

@manucorporat Actually, setRoot is called from somewhere else, so its a bit tricky for the modal to "know" when it should close.... but I will think about a workaround
Thank you for your time :)

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 8, 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

No branches or pull requests

2 participants