-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Add ability to disable setActiveHash (6b6d268) #482
Comments
Happy to make a PR if this is an acceptable change. |
Would you please provide the details about these issues? |
Maybe we can add option to disable the default hash active behaviors. |
Ya, my thought was to have a theme config that would allow for disabling this feature. I didn't look too closely at it, but I think the issue lies in if the URL has an existing hash that isn't in the sidebar links or the header anchors the auto scrolling behavior seems to freak out. (bounce back and forth and default to no hash set, leaving you stuck at the top of the page) My site has a vue-plyr component, and as the player plays, it updates the hash in the url w/ the players timestamp (allows for easily sharing the exact spot the listener was at). There are also links (bookmarks) in the page that can jump to sections in the player. Anyways, without it being a complete re-thinking of what instances to scroll, and observing hash changes, other anchors, etc. I think just allowing for disabling of this feature seems to be the shortest path forward. |
Still trying to find other paths forward, you can kind of see an issue doing these steps:
Observe that the So again, I think the issue lies in the assumption in this logic that the only valid anchor links must be in the sidebar and have the |
I cannot find the point, so I don't think I can fully understand your problem, but PR welcome. |
Close by #489 |
setActiveHash is causing issues on my site (#272) (6b6d268)
I just updated to 0.9.0 and this seems to be the only issue I've run into. 👍
I have several non sidebar links, and I also have a media player that updates the hash and scroll position based on the timestamp of the player.
This new default capability breaks this functionality.
It's a nice default in probably >90% of use cases, so just the ability to disable would be awesome.
The text was updated successfully, but these errors were encountered: