-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
bug: Presenting a modal with a leave animation immediately after dismissing clears the presented modal's content #26542
Comments
Thanks for the issue! This issue has been labeled as |
@thor9n thanks for reporting this issue. I am able to reproduce. I believe this problem stems from: #24508. There is a comment in the previous changes:
While we do not need to detach the destroyed component, we do still need to invoke the life cycle events for controller-based overlays. I'll capture this as a bug and prioritize in our backlog. |
@thor9n after researching further, I've been able to isolate this to how we remove teleported components in Vue. Can you try with this dev-build and let me know if you run into any issues?
I tested against your reproduction and it appears to resolve the core issue. |
@sean-perkins thanks for looking into this quickly! I can confirm that the modal works as expected, even after not configuring Well done 👍🏼 |
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. |
Prerequisites
Ionic Framework Version
Current Behavior
Behaviour
modalController.dismiss(undefined, undefined, "my-modal-id")
in an existing modal, and then immediately opening a new modal, causes the new modal's content to be deleted.leaveAnimation
are disabled when creating the modal, but obviously this shouldn't be needed.Links
Live example on Codesandbox
Github issue explaining the three dismiss() arguments
Background/Use-case
When my users creates a new playlist they are redirected to that list's page, and immediately a Sheet Modal with the option to add songs are shown.
Expected Behavior
The following steps should display the last modal's content, no matter what animation settings are applied to the first modal.
Steps to Reproduce
Link to Codesandbox showing the bug:
https://codesandbox.io/s/ionic-modal-dismiss-bug-7wmotx
(don't ask me why the routes are placed above eachother when redirecting, but the example works anyways)
Code Reproduction URL
https://codesandbox.io/s/ionic-modal-dismiss-bug-7wmotx
Ionic Info
Additional Information
No response
The text was updated successfully, but these errors were encountered: