diff --git a/src/client/theme-default/components/VPDocAsideOutline.vue b/src/client/theme-default/components/VPDocAsideOutline.vue index b4b179089509..58ebe838e65e 100644 --- a/src/client/theme-default/components/VPDocAsideOutline.vue +++ b/src/client/theme-default/components/VPDocAsideOutline.vue @@ -22,7 +22,9 @@ const resolvedHeaders = computed(() => { function handleClick({ target: el }: Event) { const id = '#' + (el as HTMLAnchorElement).href!.split('#')[1] - const heading = document.querySelector(id) as HTMLAnchorElement + const heading = document.querySelector( + decodeURIComponent(id) + ) as HTMLAnchorElement heading?.focus() }