feat: scroll active outline marker into view on activation

pull/3654/head
Bobbie Goede 4 months ago
parent 11a76961ee
commit eb7498b3dc

@ -197,6 +197,7 @@ export function useActiveAnchor(
if (activeLink) {
activeLink.classList.add('active')
activeLink.scrollIntoView({ behavior: 'smooth', block: 'center' })
marker.value.style.top = activeLink.offsetTop + 39 + 'px'
marker.value.style.opacity = '1'
} else {

Loading…
Cancel
Save