Skip to content

Commit 38cb27a

Browse files
committed
prevent scroll on focus
1 parent 9ba9f9b commit 38cb27a

File tree

1 file changed

+1
-1
lines changed
  • packages/circuit-ui/components/Tabs/components/Tab

1 file changed

+1
-1
lines changed

packages/circuit-ui/components/Tabs/components/Tab/Tab.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const Tab = forwardRef<HTMLButtonElement, TabProps>(
5656

5757
useEffect(() => {
5858
if (selected) {
59-
tabRef?.current?.focus();
59+
tabRef?.current?.focus({ preventScroll: true });
6060
}
6161
}, [selected]);
6262
return (

0 commit comments

Comments
 (0)