fix(router): Delay router scroll event until navigated components hav…#47563
Closed
atscott wants to merge 2 commits intoangular:mainfrom
Closed
fix(router): Delay router scroll event until navigated components hav…#47563atscott wants to merge 2 commits intoangular:mainfrom
atscott wants to merge 2 commits intoangular:mainfrom
Conversation
Contributor
Author
7d9321e to
6e7cd35
Compare
Contributor
Author
|
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
a3b17a1 to
bf257d5
Compare
…nts have rendered
bf257d5 to
995cb59
Compare
Contributor
|
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
|
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. |
trekladyone
pushed a commit
to trekladyone/angular
that referenced
this pull request
Feb 1, 2023
…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 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
…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