fix: disable auto-capitalize on Input component for macOS (#3626)

Add autoComplete, autoCorrect, autoCapitalize, and spellCheck attributes
to prevent macOS from auto-capitalizing the first letter in input fields.
This commit is contained in:
ZHLH
2026-06-04 23:11:23 +08:00
committed by GitHub
Unverified
parent ad030da3b1
commit dadefdee77
+4
View File
@@ -12,6 +12,10 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
"flex h-9 w-full rounded-md border border-border-default bg-background text-foreground px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-blue-500/20 dark:focus:ring-blue-400/20 disabled:cursor-not-allowed disabled:opacity-50",
className,
)}
autoComplete="off"
autoCorrect="off"
autoCapitalize="off"
spellCheck={false}
ref={ref}
{...props}
/>