Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue number: resolves #29705
What is the current behavior?
In a Vue tabs app, clicking the active tab button after landing directly on a tab child (browser refresh on
/tabs/tab1/child, or browser back from an externalwindow.location.href) is a silent no-op.IonTabBar.checkActiveTabonly records the active tab'scurrentHrefwhen there's aprevActiveTab, so the initial deep load leavescurrentHrefmatchingoriginalHrefand theoriginalHref !== currentHrefguard inIonTabButton.onClickskipsresetTab. Even past that guard,resetTabissuesrouter.go(routeInfo.position - currentHistoryPosition), which resolves torouter.go(0)when the tab's only history entry is the current page.What is the new behavior?
IonTabBar.checkActiveTabnow recordscurrentHrefon initial setup so the tab state reflects the deep-loaded URL.resetTabtakes the tab'soriginalHrefand, when the first history entry for the tab is the current entry, falls back tohandleNavigate(originalHref, "pop", "back", undefined, tab). Thepopaction routes throughrouter.replace, so the deep-loaded child entry is replaced rather than stacked on top and no stale child entry stays in browser history.Does this introduce a breaking change?
Other information
Manual test: /vue/tabs/tab1/childone. Load that URL directly, click the Tab 1 button, you should land on
/vue/tabs/tab1