Skip to content

Commit 4f77b13

Browse files
committed
chore: cherry-pick button tabindex fixes
#7306
1 parent f88feb2 commit 4f77b13

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/ui/src/elements/ClipboardInput.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export const ClipboardInput = (props: ClipboardInputProps) => {
3030
<Button
3131
elementDescriptor={descriptors.formFieldInputCopyToClipboardButton}
3232
variant='ghost'
33-
tabIndex={-1}
3433
onClick={onCopy}
3534
sx={{
3635
position: 'absolute',

packages/ui/src/elements/PasswordInput.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export const PasswordInput = forwardRef<HTMLInputElement, PasswordInputProps>((p
3131
setWarning,
3232
setError,
3333
setHasPassedComplexity,
34+
tabIndex,
3435
...rest
3536
} = props;
3637
const inputRef = useRef<HTMLInputElement>(null);
@@ -86,6 +87,7 @@ export const PasswordInput = forwardRef<HTMLInputElement, PasswordInputProps>((p
8687
>
8788
<Input
8889
{...rest}
90+
tabIndex={tabIndex}
8991
onChange={onChange}
9092
onBlur={e => {
9193
rest.onBlur?.(e);
@@ -108,7 +110,7 @@ export const PasswordInput = forwardRef<HTMLInputElement, PasswordInputProps>((p
108110
aria-label={`${hidden ? 'Show' : 'Hide'} password`}
109111
variant='ghost'
110112
size='xs'
111-
tabIndex={-1}
113+
tabIndex={tabIndex}
112114
onClick={() => setHidden(s => !s)}
113115
sx={theme => ({
114116
position: 'absolute',

0 commit comments

Comments
 (0)