feat: scroll active outline marker into view on activation

pull/3654/head
Bobbie Goede 2 years ago
parent c840f91c99
commit 0ff447912b

@ -168,6 +168,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