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 #24074
What is the current behavior?
In vue-router, a
router.pushperformed withrouterDirection="none"doesn't setpushedByRouteon the resulting route info. The next page'sion-back-buttonthen can't find a previous entry and falls back todefaultHrefinstead of going back through history.The same bug was previously fixed for react-router in v6, this is the vue version of the fix (Angular doesn't need this fix because the router works very differently)
What is the new behavior?
createIonRouternow setspushedByRoutefrom the leaving location when the navigation isrouterAction === "push",routerDirection === "none", and stays within the same tab context. Cross-tab pushes with directionnonestill go through the existing tab-aware branch, which has differentpushedByRoutesemanticsAfter the fix,
ion-back-buttonreturns to the prior page through history and only falls back todefaultHrefwhen there's genuinely no history to pop.Does this introduce a breaking change?
Other information
New Playwright spec
direction-none-back.spec.tscovers both theforwardandnonepaths and asserts the back button lands on Page A, not thedefaultHreffallbackTest Page