fix(theme): scroll code group tab into view on selection

closes #2355
Co-authored-by: izayl <izayl@163.com>
pull/2736/head
Divyansh Singh 1 year ago
parent 039798a8c1
commit 1a6efbae8e

@ -37,6 +37,9 @@ export function useCodeGroups() {
current.classList.remove('active') current.classList.remove('active')
next.classList.add('active') next.classList.add('active')
const label = group?.querySelector(`label[for="${el.id}"]`)
label?.scrollIntoView({ block: 'nearest' })
} }
}) })
} }

Loading…
Cancel
Save