-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: restore the sidebar position to make the selected entry showed #492
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for hugo-hextra ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw, can you share the vitepress implementation you mentioned for saving the sidebar scroll position?
assets/js/sidebar.js
Outdated
} | ||
|
||
sidebarScrollbar.addEventListener('scroll', function() { | ||
saveSidebarPosition(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need debouncing the event handler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I have add the new function.
To be honest, I don't know how Vitepress is implemented, I'm just referring to the effects. |
update the theme 241104
save and restore the sidebar position to make the selected entry showed. #490