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): Delay router scroll event until navigated components hav… #47563
Conversation
7d9321e
to
6e7cd35
Compare
Reviewer note: While I don't consider this a breaking change, I had to adjust some of our own test assertions. For safety, let's merge this into a major version only. If there are many reports of this truly being breaking, we can later add a note to the breaking changes page on aio. |
…e rendered Currently, the scroll event is fired immediately after the `NavigationEnd`. However, this is problematic because a change detection has not been able to run, meaning that Angular will not yet have run the update block of the component templates being rendered as part of the navigation. This change delays the scroll event using a `setTimeout`, which will allow Angular's change detection to run before the scroll restoration is performed. fixes angular#24547
08d0d02
to
31d4c73
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.
@atscott LGTM 👍
a3b17a1
to
bf257d5
Compare
…nts have rendered
bf257d5
to
995cb59
Compare
This PR was merged into the repository by commit af8afee. |
…e rendered (#47563) Currently, the scroll event is fired immediately after the `NavigationEnd`. However, this is problematic because a change detection has not been able to run, meaning that Angular will not yet have run the update block of the component templates being rendered as part of the navigation. This change delays the scroll event using a `setTimeout`, which will allow Angular's change detection to run before the scroll restoration is performed. fixes #24547 PR Close #47563
…e rendered (angular#47563) Currently, the scroll event is fired immediately after the `NavigationEnd`. However, this is problematic because a change detection has not been able to run, meaning that Angular will not yet have run the update block of the component templates being rendered as part of the navigation. This change delays the scroll event using a `setTimeout`, which will allow Angular's change detection to run before the scroll restoration is performed. fixes angular#24547 PR Close angular#47563
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. |
…e rendered (angular#47563) Currently, the scroll event is fired immediately after the `NavigationEnd`. However, this is problematic because a change detection has not been able to run, meaning that Angular will not yet have run the update block of the component templates being rendered as part of the navigation. This change delays the scroll event using a `setTimeout`, which will allow Angular's change detection to run before the scroll restoration is performed. fixes angular#24547 PR Close angular#47563
…e rendered
Currently, the scroll event is fired immediately after the
NavigationEnd
. However, this is problematic because a change detection has not been able to run, meaning that Angular will not yet have run the update block of the component templates being rendered as part of the navigation.This change delays the scroll event using a
setTimeout
, which will allow Angular's change detection to run before the scroll restoration is performed.fixes #24547