-
Notifications
You must be signed in to change notification settings - Fork 867
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
[Bug] Randomly failed to scroll to anchor when opening docfx site's anchor link #9150
Comments
It seems related to the script that scrolls TOC to the active node. For modern template, it is the |
This comment describes problems with |
Does the fix cover the situation when scroll to anchor works before scrolling TOC to an active element? Currently, I see two types of problem in Chrome:
It looks like the fix may only address the first case. I also tested the fix on our version of DocFX-based documentation and both issues from cases 1-2 are still there. |
It seems scrolling problems are still existing on latest docfx site. Urls for tests
Behaviors when click anchor links
|
Agree with @filzrev. The scroll issue still happens. For example, https://dotnet.github.io/docfx/tutorial/advanced_support_hyperlink.html#prepare is often loaded like this (pay attention on TOC scrolling): |
Describe the bug
When opening docfx site anchor link.
Browser failed scroll to anchor randomly.
To Reproduce
Steps to reproduce the behavior:
Another example link without tab content/images. (https://dotnet.github.io/docfx/docs/dotnet-api-docs.html#filter-by-type)
It's scroll to
Filter by UID
randomly.Expected behavior
Always scrolled to specified anchor.
Context (please complete the following information):
Additional context
This issue might be related to browser's event timing.
https://www.bryanbraun.com/anchorjs/#dont-run-it-too-late.
The text was updated successfully, but these errors were encountered: