mirror of
https://github.com/netbirdio/docs.git
synced 2026-04-24 03:16:40 +00:00
Fix navigation and table of contents highlighting issues (#169)
This commit is contained in:
@@ -103,7 +103,7 @@ function useTableOfContents(tableOfContents) {
|
||||
if (tableOfContents.length === 0) return
|
||||
let headings = getHeadings(tableOfContents)
|
||||
function onScroll() {
|
||||
let top = window.scrollY
|
||||
let top = window.scrollY + 10;
|
||||
let current = headings[0]?.id
|
||||
for (let heading of headings) {
|
||||
if (top >= heading?.top) {
|
||||
|
||||
Reference in New Issue
Block a user