1 Commits
Author SHA1 Message Date
Ryan Kes 36b6a4551c 🐛 Fix smartTOC never highlighting on a page that can't scroll
getActiveAnchorId derives the active entry from scroll position alone,
so on a page short enough that scrollHeight never exceeds
window.innerHeight, the answer can never change. Clicking a TOC entry
still updates location.hash, but nothing ever picks it up as active.

Falls back to the hash when the page can't scroll, honoured only if
it names an entry the TOC actually lists. Pages that do scroll are
unaffected - this only fires when scroll position can't answer the
question at all.

Fixes #3087
2026-09-13 22:12:55 +01:00