diff --git a/src/client/app/router.ts b/src/client/app/router.ts index 0f1ca8e5..846010a2 100644 --- a/src/client/app/router.ts +++ b/src/client/app/router.ts @@ -293,8 +293,8 @@ export function scrollTo(hash: string, smooth = false, scrollPosition = 0) { target.addEventListener( 'blur', () => { - if (tabindex !== null) target.setAttribute('tabindex', tabindex) - else target.removeAttribute('tabindex') + if (tabindex == null) target.removeAttribute('tabindex') + else target.setAttribute('tabindex', tabindex) }, { once: true } )