-
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: Ion-Nav not removing pages from DOM on pop() #21831
Comments
Thanks for the issue. I'm not quite sure why the presence of the second |
I got the same issue too. My |
still not fixed, @ionic/angular ver is 5.5.0 |
Same issue, anyone got a workaround? The pages in the second |
Not sure how helpful this is but it seems that this sets this.destroyed to true. Which disables some crucial functions in the Nav instance: nav.tsx cleanup this syncs the DOM |
@svrijsewijk I got same issue. Are you using nested ion-nav? |
@cathypark I am using |
We have the same issue and because of it cannot deploy new mobile app. |
YES !! I have the same issue which cause in some cases to have my IonNav with the attribute destroyed = true while it is not destroyed, so I cannot go back with .pop() even if .canGoBack() returns true ! Then it's in a weird state where many pages are still in the DOM @liamdebeasi could you please look into this issue, this is causing huge issues in my app, thanks |
same with ionic vue |
i was able to solve this in ionic vue so the solution first modify removeviewfromdom function in framework delegate
and modify removeview function in ionic nav component in vue
now the array compare the uid between components instance and if exist it will remove it and destroy component instance and remove dom element. |
Hello everyone 👋 this has been resolved in 6.2.0. Please let me know if you run into any issues. |
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. |
Bug Report
Ionic version:
[ ] 4.x
[x] 5.x
Current behavior:
When using ion-nav pop() method page persist in DOM
Expected behavior:
Page should be removed from DOM
Steps to reproduce:
First there should be ion-nav and ion-router-outlet on the same level for bug to be reproducible. Page that are loaded via router-outlet should also contain an instance of ion-nav and when using that instance for pushing and popping the pages are not getting destroyed or rather they stay in DOM with display: none.
Using the project provided below steps to reproduce are:
Inspect html structure and you will see the child component is still in DOM even though we popped it.
Related code:
Here is the minimal structure needed for the bug to reproduce https://github.com/Gorshtak/bug-ion-nav
The text was updated successfully, but these errors were encountered: