Fix sidenav highlight issue
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 is attempting to deploy a commit to the Docsify Team on Vercel.
A member of the Team first needs to authorize it.
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 |
Hi @knno Can you pull code from develop? There are a lot of conflicts right now.
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!