-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Open
Labels
Description
Description
I discovered this because some of the links that show up in the search plugin do not auto scroll to the correct location.
It seems that for quite some time, the onNavigate query selector only goes down to h5.
Surely this line should be :where(h1, h2, h3, h4, h5, h6) no?
Expected behavior
When clicking on a link that includes an anchor that is an h6 header ###### Header, the page should navigate to the correct page and then auto scroll to the correct header.
Actual behavior
The page navigates to the correct page but it does not scroll at all. It doesn't scroll to the anchor or to the top of the page like it should. It ends up in a location based on the scrollTop position of the page navigated way from, which can be quite disorienting.
Steps to reproduce
- Create a document
test.mdwith a large amount of content to make sure that there is enough to create scrolling - At the bottom of the document add
###### Test - In
_sidebar.mdadd- [Test](test.md#test) - Load the page and click the
Testin the sidebar - Observe that
test.mdis loaded but does not auto scroll to theTestsection.
Environment
- Docsify Version: 5.0.0-rc
- Browser Version: all
Additional Information
- Bug still occurs when all/other plugins are disabled?