docsifyjs / docsify

🃏 A magical documentation site generator.
https://docsify.js.org
MIT License
27.82k stars 5.68k forks source link

Fix sidenav highlight issue #2502

Open knno opened 1 month ago

knno commented 1 month ago

Summary

Hi In this PR, the sidenav is fixed whenever it is scrolled and then main content is scrolled so that it doesn't lose it's scroll position. It fixes the value of isInView and notThan

There is a little problem when you scroll the page and see the sidenav highlighted item, it is automatically scrolled to top in the sidebar, this is distracting if the user scrolls the sidebar for a look or such, then continues to scroll in the main content.

Related issue, if any:

What kind of change does this PR introduce?

Bugfix

For any code change,

Does this PR introduce a breaking change?

No

Tested in the following browsers:

vercel[bot] commented 1 month ago

@knno is attempting to deploy a commit to the Docsify Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docsify-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 7, 2024 6:48am