diff --git a/src/client/theme-default/composables/outline.ts b/src/client/theme-default/composables/outline.ts index 74e72a0f..e3396f25 100644 --- a/src/client/theme-default/composables/outline.ts +++ b/src/client/theme-default/composables/outline.ts @@ -170,6 +170,10 @@ export function useActiveAnchor( activeLink.classList.add('active') marker.value.style.top = activeLink.offsetTop + 39 + 'px' marker.value.style.opacity = '1' + activeLink.scrollIntoView({ + block: 'center', + inline: 'nearest' + }) } else { marker.value.style.top = '33px' marker.value.style.opacity = '0'