This website requires JavaScript.
Explore
Help
Sign in
jesus
/
mdbook
Watch
1
Star
0
Fork
You've already forked mdbook
0
Code
Issues
Pull requests
Projects
Releases
Packages
Wiki
Activity
Actions
f0d9591bb9
mdbook
/
tests
/
gui
/
books
/
sidebar-scroll
/
src
/
chapter_7.md
2 lines
12 B
Markdown
Raw
Normal View
History
Unescape
Escape
Fix sidebar scroll position when heading nav is involved This fixes an issue where the sidebar was scrolling incorrectly when clicking on chapters when a heading nav is currently in view. The problem was that it was storing the scrollTop of the sidebar, but it was not considering that when navigating to another chapter that the heading nav of the previous chapter would disappear. The solution is to keep of an offset instead so that it can make sure that the vertical position of the clicked chapter stays in the same relative position when the new page loads. Fixes https://github.com/rust-lang/mdBook/issues/2967
2025-12-11 11:13:47 -08:00
# Chapter 7
Reference in a new issue
Copy permalink