Skip to content

Commit d101e12

Browse files
fix: 🆑 Prevent double focus on button link
1 parent de3e273 commit d101e12

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/components/designSystem/ButtonLink.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export const ButtonLink = forwardRef<HTMLAnchorElement, ButtonLinkProps>(
7676
condition={!!external}
7777
validWrapper={(wrapperChildren) => (
7878
<ExternalButtonLink
79+
tabIndex={-1}
7980
className={classNames}
8081
href={to}
8182
ref={ref}
@@ -86,7 +87,7 @@ export const ButtonLink = forwardRef<HTMLAnchorElement, ButtonLinkProps>(
8687
</ExternalButtonLink>
8788
)}
8889
invalidWrapper={(wrapperChildren) => (
89-
<InternalButtonLink className={classNames} to={to} ref={ref}>
90+
<InternalButtonLink tabIndex={-1} className={classNames} to={to} ref={ref}>
9091
{wrapperChildren}
9192
</InternalButtonLink>
9293
)}

0 commit comments

Comments
 (0)