Skip to content

Commit

Permalink
fix(ue): scroll to the active item on docs nav (#806)
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang authored Sep 20, 2024
1 parent 8c7927a commit c28627e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions assets/hb/modules/docs/js/nav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,7 @@
}

active(link)
document.addEventListener('DOMContentLoaded', () => {
document.querySelector('.hb-docs-nav')?.scrollTo(0, link.offsetTop)
})
})()

0 comments on commit c28627e

Please sign in to comment.