Skip to content
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

docs: Reference page anchor scroll consistency #55566

Closed
wants to merge 1 commit into from

Conversation

atscott
Copy link
Contributor

@atscott atscott commented Apr 26, 2024

The docs-viewer loads asynchronously and can happen after the scroll event has happened and the Router has attempted to scroll to the requested position/anchor. This commit saves the scroll event and handles it again if the cards are loaded after scrolling happens.

Example: https://angular.dev/api/router/Router#dispose (refreshing this page a bunch of times sometimes scrolls to the dispose method and other times does not)

The docs-viewer loads asynchronously and can happen after the scroll
event has happened and the Router has attempted to scroll to the
requested position/anchor. This commit saves the scroll event and
handles it again if the cards are loaded after scrolling happens.
@atscott atscott requested a review from JeanMeche April 26, 2024 23:30
@angular-robot angular-robot bot added the area: docs Related to the documentation label Apr 26, 2024
@ngbot ngbot bot added this to the Backlog milestone Apr 26, 2024
@atscott atscott added target: patch This PR is targeted for the next patch release and removed area: docs Related to the documentation labels Apr 26, 2024
@ngbot ngbot bot removed this from the Backlog milestone Apr 26, 2024
Copy link

Deployed adev-preview for 6131f65 to: https://ng-dev-previews-fw--pr-angular-angular-55566-adev-prev-rdxzz8fs.web.app

Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt.

Copy link
Member

@JeanMeche JeanMeche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this improvement !

@thePunderWoman thePunderWoman added the area: adev Angular.dev documentation label Apr 30, 2024
@ngbot ngbot bot added this to the Backlog milestone Apr 30, 2024
@bencodezen bencodezen added the action: merge The PR is ready for merge by the caretaker label Apr 30, 2024
@AndrewKushnir
Copy link
Contributor

This PR was merged into the repository by commit 99cf450.

AndrewKushnir pushed a commit that referenced this pull request Apr 30, 2024
The docs-viewer loads asynchronously and can happen after the scroll
event has happened and the Router has attempted to scroll to the
requested position/anchor. This commit saves the scroll event and
handles it again if the cards are loaded after scrolling happens.

PR Close #55566
AndrewKushnir pushed a commit that referenced this pull request Apr 30, 2024
The docs-viewer loads asynchronously and can happen after the scroll
event has happened and the Router has attempted to scroll to the
requested position/anchor. This commit saves the scroll event and
handles it again if the cards are loaded after scrolling happens.

PR Close #55566
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 adev: preview area: adev Angular.dev documentation target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants