diff --git a/src/client/theme-default/composables/outline.ts b/src/client/theme-default/composables/outline.ts index d9eda9c123be..c85842097011 100644 --- a/src/client/theme-default/composables/outline.ts +++ b/src/client/theme-default/composables/outline.ts @@ -166,6 +166,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'