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
Closed
+67
−31
Conversation
This file contains 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
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. |
AndrewKushnir
reviewed
Sep 29, 2022
…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
a3b17a1
to
bf257d5
Compare
…nts have rendered
This PR was merged into the repository by commit af8afee. |
dylhunn
pushed a commit
that referenced
this pull request
Oct 19, 2022
…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
nouraellm
pushed a commit
to nouraellm/angular
that referenced
this pull request
Nov 6, 2022
…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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
action: merge
The PR is ready for merge by the caretaker
area: router
target: rc
This PR is targeted for the next release-candidate
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.
…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