docsify icon indicating copy to clipboard operation
docsify copied to clipboard

Fix sidenav highlight issue

Open knno opened this issue 1 year ago • 2 comments

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,

  • [ ] Related documentation has been updated, if needed
  • [ ] Related tests have been added or updated, if needed

Does this PR introduce a breaking change?

No

Tested in the following browsers:

  • [ ] Chrome
  • [x] Firefox
  • [ ] Safari
  • [x] Edge

knno avatar Oct 06 '24 12:10 knno

@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] avatar Oct 06 '24 12:10 vercel[bot]

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

vercel[bot] avatar Oct 07 '24 06:10 vercel[bot]

Hi @knno Can you pull code from develop? There are a lot of conflicts right now.

sy-records avatar Dec 16 '24 05:12 sy-records

Hi @sy-records Regarding the scrolling bug, I see that develop branch works as expected. : ) And my changes are in the src/core/event/scroll.js so no need for this PR anymore thanks!

knno avatar Dec 16 '24 17:12 knno