anastasis-webui: auto-focus
This commit is contained in:
parent
3aad5e774d
commit
6f4c0a6fb2
@ -585,10 +585,10 @@ function AuthMethodSmsSetup(props: AuthMethodSetupProps) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
//const inputRef = useRef<HTMLInputElement>(null);
|
const inputRef = useRef<HTMLInputElement>(null);
|
||||||
// useLayoutEffect(() => {
|
useLayoutEffect(() => {
|
||||||
// inputRef.current?.focus();
|
inputRef.current?.focus();
|
||||||
// }, []);
|
}, []);
|
||||||
return (
|
return (
|
||||||
<AnastasisClientFrame hideNav title="Add SMS authentication">
|
<AnastasisClientFrame hideNav title="Add SMS authentication">
|
||||||
<div>
|
<div>
|
||||||
@ -601,7 +601,7 @@ function AuthMethodSmsSetup(props: AuthMethodSetupProps) {
|
|||||||
Mobile number:{" "}
|
Mobile number:{" "}
|
||||||
<input
|
<input
|
||||||
value={mobileNumber}
|
value={mobileNumber}
|
||||||
//ref={inputRef}
|
ref={inputRef}
|
||||||
style={{ display: "block" }}
|
style={{ display: "block" }}
|
||||||
autoFocus
|
autoFocus
|
||||||
onChange={(e) => setMobileNumber((e.target as any).value)}
|
onChange={(e) => setMobileNumber((e.target as any).value)}
|
||||||
|
Loading…
Reference in New Issue
Block a user