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: navigation breaks when replacing nested tab view #30617
I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v8.x
Current Behavior
When using nested routes and tabs there is a situation where navigation breaks when you replace a nested tab view with a sibling (and switching tabs between). When this happens the back button in the view doesn't work and you can't switch to the previous tab.
Expected Behavior
The back button should go to the Tab 1 view
Clicking on the Tab 2 tab should show the Tab 2 view
Verified on 9.0.8. useIonRouter().replace() is a root navigation: it is the same as ionRouter.navigate(path, 'root', 'replace'), which resets the navigation history so the new page becomes the start of the stack. View 2 therefore has nothing to go back to, but it still shows a back button, so tapping it does nothing. Switching to Tab 2 works on 9.0.8.
Workaround, verified on 9.0.8: keep replace() and give the back button on the replacing page a default-href pointing at the page it should return to. With no history to go back to, the back button falls back to that route:
We do not recommend switching to ionRouter.navigate(path, 'forward', 'replace') or Vue Router's router.replace() for this flow yet. They keep the history, but after a tab switch the back button changes the URL and leaves the replaced page on screen.
Activity
fix: preserve tab property on replace and correct pop delta for leavi…
thetaPC commentedon Oct 16, 2026
Thanks for the report, and sorry for the delay.
Verified on 9.0.8.
useIonRouter().replace()is a root navigation: it is the same asionRouter.navigate(path, 'root', 'replace'), which resets the navigation history so the new page becomes the start of the stack. View 2 therefore has nothing to go back to, but it still shows a back button, so tapping it does nothing. Switching to Tab 2 works on 9.0.8.Workaround, verified on 9.0.8: keep
replace()and give the back button on the replacing page adefault-hrefpointing at the page it should return to. With no history to go back to, the back button falls back to that route:We do not recommend switching to
ionRouter.navigate(path, 'forward', 'replace')or Vue Router'srouter.replace()for this flow yet. They keep the history, but after a tab switch the back button changes the URL and leaves the replaced page on screen.Tracked as a bug in
@ionic/vue-router.fix(vue-router): keep back working after replacing a page in tabs (io…