-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(router): Ensure anchor scrolling happens on ignored same URL navigations #48025
Conversation
2da5f46
to
682707a
Compare
682707a
to
7db94b7
Compare
cleanup: CI is failing, looks like the PR still needs golden file update. |
7db94b7
to
adde971
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewed-for: public-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Reviewed-for: public-api
adde971
to
8207176
Compare
8207176
to
42d0402
Compare
42d0402
to
b8b58a5
Compare
…gations The Router scroller only listens for NavigationEnd events. However, the default behavior of the Router is to ignore navigations to the same URL. This breaks the anchor scrolling when clicking on an anchor whose fragment is already in the URL. fixes angular#29099 BREAKING CHANGE: The `Scroll` event's `routerEvent` property may also be a `NavigationSkipped` event. Previously, it was only a `NavigationEnd` event.
b8b58a5
to
89b9772
Compare
This PR was merged into the repository by commit 1f055b9. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
The Router scroller only listens for NavigationEnd events. However, the
default behavior of the Router is to ignore navigations to the same URL.
This breaks the anchor scrolling when clicking on an anchor whose
fragment is already in the URL.
fixes #29099
BREAKING CHANGE: The
Scroll
event'srouterEvent
property may also bea
NavigationSkipped
event. Previously, it was only aNavigationEnd
event.