You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: vue re-mounts intermediary views when not needed #23914
I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v4.x
v5.x
v6.x
Current Behavior
I have IonMenu with a list of routes.
When I push a page(Orders) for the first time all is well.
and again when I push to a new page for the second time it renders the new page(Products) and the old page(Orders).
It affects my methods that I created for both pages. It calls all the created methods from both page.
Description:
When in home page router to Products, the Products page will render two components included the Order view page.
But if we reload in child component like the Product page, then return home page. And router again to order then return the home router to products will no render also to components anymore.
Same as for me. Currently in my new app, i have only 3 pages, home, login and register. Switching from Login to Register, vice versa, or from Home to either of them renders 2 views at same time. I can also post a video if needed.
changed the title [-]bug: IonRouterOutlet rerender old route when pushing new route[/-][+]bug: vue re-mounts intermediary views when not needed[/+]on Sep 21, 2021
We do not have a boilerplate JSFiddle at the moment. The easiest approach is probably to create a blank Ionic starter app, reproduce the issue there, and then push that app to GitHub.
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.
Activity
whitersun commentedon Sep 12, 2021
For more detail issue, please watch it.
https://drive.google.com/file/d/1gNdeJHYdGitj_ApHNeUKQFXiwG8hJTRe/view?usp=sharing
Description:
When in home page router to Products, the Products page will render two components included the Order view page.
But if we reload in child component like the Product page, then return home page. And router again to order then return the home router to products will no render also to components anymore.
UrosPavlovic commentedon Sep 12, 2021
Same as for me. Currently in my new app, i have only 3 pages, home, login and register. Switching from Login to Register, vice versa, or from Home to either of them renders 2 views at same time. I can also post a video if needed.
Relevant deps:
"@ionic/vue": "^5.4.0",
"@ionic/vue-router": "^5.4.0",
"vue": "^3.2.1",
"vue-router": "^4.0.0-0",
[-]bug: IonRouterOutlet rerender old route when pushing new route[/-][+]bug: vue re-mounts intermediary views when not needed[/+]liamdebeasi commentedon Sep 21, 2021
Thanks for the issue. Looks like this line is the culprit: https://github.com/ionic-team/ionic-framework/blob/main/packages/vue/src/components/IonRouterOutlet.ts#L292 We probably need to be more specific about which views we remount by taking into account the delta value that the app was navigated with. I will look into a fix. As a temporary workaround, you can downgrade to v5.6.13.
whitersun commentedon Sep 28, 2021
Hi @liamdebeasi, I am afraid of if I downgrade to version 5.6.13 will influence the router.replace that got transition not remove from the prev view page rendered like the last issue of:
https://forum.ionicframework.com/t/page-transition-with-router-replace/214614/8
this was fixed that just not showing errors anymore. But that still had a router.replace problem, transition gets an incorrect view.
#22654
whitersun commentedon Oct 4, 2021
Thanks for @liamdebeasi to point the problem, I finally solved this bug by changing abit code from
ionic-framework/packages/vue-router/src/viewStacks.ts
Line 223 in 25eb8cd
and below this link is my video record solution.
https://drive.google.com/file/d/1QCvTexQ5ZqYlSwzaE4aHbfXc6TDzuJAA/view?usp=sharing
Bug code:
fixed code:
or
6 remaining items
tigohenryschultz commentedon Oct 11, 2021
Cleaning out my node modules and re-building to have a cleaner test
tigohenryschultz commentedon Oct 11, 2021
Nuked my node modules and rebuilt, it is fine and I don't see the bug anymore, thanks @liamdebeasi sorry for false flag
liamdebeasi commentedon Oct 11, 2021
Glad the issue is resolved, and thanks for testing!
liamdebeasi commentedon Oct 14, 2021
Thanks for the issue. This has been resolved via #24056, and a fix will be available in an upcoming release of Ionic Framework.
Please feel free to continue testing the dev build, and let me know if you run into any issues. Thanks!
fix(vue): mount correct views when navigating (#24056)
tigohenryschultz commentedon Oct 22, 2021
We had to revert 5.9.0-dev.202110121546.9dce03f back to 5.8.3 because the @ionChange event stopped working on ion-radio-group
liamdebeasi commentedon Oct 22, 2021
@tigohenryschultz Can you provide a reproduction?
tigohenryschultz commentedon Oct 22, 2021
Is there an ionic/vue boilerplate for jsfiddle.com I could point to the dev build for reproducing?
liamdebeasi commentedon Oct 22, 2021
We do not have a boilerplate JSFiddle at the moment. The easiest approach is probably to create a blank Ionic starter app, reproduce the issue there, and then push that app to GitHub.
tigohenryschultz commentedon Oct 22, 2021
https://github.com/tigohenryschultz/radio-button-group-bug
Select a radio option should trigger:
5.8.4 does, the 5.9.0 doesnt
liamdebeasi commentedon Oct 22, 2021
Looks like that dev build had some other experimental work in it. Here's a new dev build with only the Vue fixes:
tigohenryschultz commentedon Oct 22, 2021
Awesome, thanks again @liamdebeasi
ionitron-bot commentedon Nov 22, 2021
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.