executablebooks / sphinx-book-theme

A clean book theme for scientific explanations and documentation with Sphinx
https://sphinx-book-theme.readthedocs.io
BSD 3-Clause "New" or "Revised" License
439 stars 201 forks source link

Anchor link does not scroll to the top of the browser #751

Closed luarss closed 1 year ago

luarss commented 1 year ago

Describe the bug

context When I click on an anchor link such as this

expectation I expected to see the anchor rise to the top of page, or as top as it can go.

image

bug But instead this happens

image

Reproduce the bug

Use the links described above.

Here is a link to the docs root folder: https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/docs

List your environment

Our requirements file:

git+https://github.com/executablebooks/sphinx-external-toc
sphinx
sphinx-autobuild
myst-parser
sphinxcontrib-mermaid
sphinx-book-theme
sphinx-copybutton
welcome[bot] commented 1 year ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

luarss commented 1 year ago

Side note that might be useful: I tried in two different browsers and noticed the following. Looks to be an issue where the page goes to the correct place, but then the images finish loading and the page scrolls down.

https://github.com/The-OpenROAD-Project/OpenROAD/pull/3640#issuecomment-1651538299

luarss commented 1 year ago

Turns out the issue is not related to sphinx-book-theme, it is related to mermaid diagrams rendering .

For future reference refer to link