diff --git a/src/components/auth/AuthForm.tsx b/src/components/auth/AuthForm.tsx index 466e2bc..f5f727e 100644 --- a/src/components/auth/AuthForm.tsx +++ b/src/components/auth/AuthForm.tsx @@ -211,12 +211,12 @@ function AuthFormInner() { name="cellNumber" type="tel" inputMode="numeric" - autoComplete="tel" + autoComplete="off" placeholder="09123456789" dir="ltr" pattern="09[0-9]{9}" required={isLogin} - defaultValue={pendingCell} + defaultValue={pendingCell || undefined} /> {loginMethod === "password" ? ( @@ -338,6 +339,7 @@ function AuthFormInner() { name="cellNumber" type="tel" inputMode="numeric" + autoComplete="off" placeholder="09123456789" dir="ltr" pattern="09[0-9]{9}" @@ -373,8 +375,9 @@ function AuthFormInner() { label="شماره موبایل" name="cellNumber" type="tel" + autoComplete="off" dir="ltr" - defaultValue={pendingCell} + defaultValue={pendingCell || undefined} required /> {title} {subtitle} - + {children} @@ -484,17 +492,31 @@ function AuthPanel({ function Field({ id, label, + autoComplete = "off", + onFocus, ...props }: { id: string; label: string; } & InputHTMLAttributes) { + const [unlockAutofill, setUnlockAutofill] = useState(false); + return ( {label} - + { + if (!unlockAutofill) setUnlockAutofill(true); + onFocus?.(event); + }} + /> ); }
{subtitle}