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, memoryRouter + tapping tab while inside nested route does nothing #29785
I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v8.x
Current Behavior
When using memory history router and tapping on ion-tab while being on a nested route, nothing happens.
While debugging I found that route.position is undefined when trying to reset to root page. That maybe expected, not sure.
When using web history router, navigation to root page works as expected. I have to use memory router to make swipe back working inside PWA.
[ERROR] Invalid project type: vue-vite (project config: ./ionic.config.json).
Project type must be one of: angular, ionic-angular, ionic1, custom, react, vue
Bad project type: undefined
Verified. Reproduces on every supported version: 8.7.5 and 9.0.3.
Your debugging was right, and route.position being undefined is the whole bug rather than a side detail. createMemoryHistory keeps its cursor in a private variable and never publishes it in history.state, which is the one place Ionic's router reads it from. When you tap the tab you are already on, Ionic works out how many entries to go back by subtracting the tab root's position from the current one. With memory history both are undefined, so the offset is NaN and router.go(NaN) moves nowhere. Web and hash history both publish a numeric position, which is why they work.
Only tapping the active tab is affected. Switching to a different tab from a child page takes a different code path and works fine under memory history.
Tracked internally for a fix in @ionic/vue-router. Thanks for the clear report and for doing the debugging.
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
thetaPC commentedon Sep 10, 2026
Thank you for submitting the issue!
Verified. Reproduces on every supported version: 8.7.5 and 9.0.3.
Your debugging was right, and
route.positionbeingundefinedis the whole bug rather than a side detail.createMemoryHistorykeeps its cursor in a private variable and never publishes it inhistory.state, which is the one place Ionic's router reads it from. When you tap the tab you are already on, Ionic works out how many entries to go back by subtracting the tab root's position from the current one. With memory history both areundefined, so the offset isNaNandrouter.go(NaN)moves nowhere. Web and hash history both publish a numeric position, which is why they work.Only tapping the active tab is affected. Switching to a different tab from a child page takes a different code path and works fine under memory history.
Tracked internally for a fix in
@ionic/vue-router. Thanks for the clear report and for doing the debugging.fix(vue-router): reset tab with memory history (ionic-team#31511)
ShaneK commentedon Oct 7, 2026
Hey! Thanks for the bug report! This has been fixed in v9.0.7!
ionitron-bot commentedon Nov 6, 2026
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.