Skip to content

Conversation

@ShaneK
Copy link
Member

@ShaneK ShaneK commented Dec 10, 2025

Issue number: resolves internal


What is the current behavior?

When switching between tabs using the tab bar in a React Router 6 application, clicking IonBackButton incorrectly navigates back to the previous tab. Each tab should have its own isolated navigation history stack, and the back button should only navigate within the current tab's history.

What is the new behavior?

Tab navigation history is now properly isolated. When switching tabs via the tab bar:

  • The back button only navigates within the current tab's history
  • Pressing back on a tab root (with no navigation history) does nothing instead of navigating to the previous tab or default route
  • Within-tab navigation continues to work correctly (e.g., navigating to a details page and back)
  • Tab history is preserved when switching away and returning to a tab

Does this introduce a breaking change?

  • Yes
  • No

Other information

Current dev build:

8.7.12-dev.11765377112.16762e5b

@ShaneK ShaneK requested a review from a team as a code owner December 10, 2025 14:13
@ShaneK ShaneK requested review from gnbm and removed request for a team December 10, 2025 14:13
@vercel
Copy link

vercel bot commented Dec 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
ionic-framework Ready Ready Preview Comment Dec 10, 2025 2:13pm

@github-actions github-actions bot added the package: react @ionic/react package label Dec 10, 2025
@ShaneK ShaneK mentioned this pull request Dec 10, 2025
3 tasks
@ptmkenny
Copy link

I installed build 8.7.12-dev.11765377112.16762e5b and manually tested by navigating around my app; this successfully restores the previous back button behavior (back button only works within a single tab; separate histories are kept per tab). Thanks!

Copy link
Contributor

@thetaPC thetaPC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@brandyscarney brandyscarney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 🚀

@ShaneK ShaneK merged commit c283319 into sk/react-router-6 Dec 10, 2025
62 checks passed
@ShaneK ShaneK deleted the fix/react-router-6-tab-history branch December 10, 2025 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: react @ionic/react package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants