Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
thetaPC
approved these changes
May 27, 2026
brandyscarney
approved these changes
May 28, 2026
brandyscarney
left a comment
Member
There was a problem hiding this comment.
Looks really good and passed my testing. Just a few optional comments on the tests but overall a lot of great coverage was added!
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
May 28, 2026
HappyKnuckles
pushed a commit
to HappyKnuckles/ionic-framework
that referenced
this pull request
Oct 3, 2026
Issue number: resolves ionic-team#19566, resolves ionic-team#19365 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? Clicking an `ion-router-link` whose `href` contains a `#fragment` (e.g. `/catalog#pens`) fails to navigate and logs `not part of the routing set`. `parsePath` in `core/src/components/router/utils/path.ts` only splits on `?`, so the fragment gets folded into the last path segment and no registered route matches. Even when navigation succeeds, the matching anchor is never scrolled into view. ## What is the new behavior? `parsePath` extracts the fragment as a separate field, and `writeSegments` writes it back onto the URL via `pushState`. Routes match against the path segments alone, so `/catalog#pens` resolves to the `/catalog` route as expected. After `writeNavStateRoot` resolves, the router polls a few animation frames for an element matching the fragment inside the active page, then smooth-scrolls to it via `ion-content.scrollToPoint`, falling back to `Element.scrollIntoView` when the target sits outside `ion-content`. A `fragmentScrollToken` cancels any in-flight scroll the moment a newer `setSegments` runs. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. --> ## Other information The fragment lookup scopes to the last `.ion-page:not(.ion-page-hidden)` in the document. Nested outlets can have multiple non-hidden pages mounted at once, and an identically-named anchor on a parent page would otherwise win over the leaf the user is viewing. Preview pages: - [router/basic](https://ionic-framework-git-fw-6958-ionic1.vercel.app/src/components/router/test/basic#/two)
This branch was successfully deployed
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 #19566, resolves #19365
What is the current behavior?
Clicking an
ion-router-linkwhosehrefcontains a#fragment(e.g./catalog#pens) fails to navigate and logsnot part of the routing set.parsePathincore/src/components/router/utils/path.tsonly splits on?, so the fragment gets folded into the last path segment and no registered route matches. Even when navigation succeeds, the matching anchor is never scrolled into view.What is the new behavior?
parsePathextracts the fragment as a separate field, andwriteSegmentswrites it back onto the URL viapushState. Routes match against the path segments alone, so/catalog#pensresolves to the/catalogroute as expected.After
writeNavStateRootresolves, the router polls a few animation frames for an element matching the fragment inside the active page, then smooth-scrolls to it viaion-content.scrollToPoint, falling back toElement.scrollIntoViewwhen the target sits outsideion-content. AfragmentScrollTokencancels any in-flight scroll the moment a newersetSegmentsruns.Does this introduce a breaking change?
Other information
The fragment lookup scopes to the last
.ion-page:not(.ion-page-hidden)in the document. Nested outlets can have multiple non-hidden pages mounted at once, and an identically-named anchor on a parent page would otherwise win over the leaf the user is viewing.Preview pages: