diff options
author | Florian Dold <florian@dold.me> | 2021-10-13 19:34:54 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-10-13 19:34:54 +0200 |
commit | 6f4c0a6fb244b8e42b6d91edd3c5901ae39f2202 (patch) | |
tree | b429b9adc1892a17993558d58f9da12f0bde23f2 /packages/anastasis-webui | |
parent | 3aad5e774dc44fc0d757f6c22152fcbb2b54ca1b (diff) | |
download | wallet-core-6f4c0a6fb244b8e42b6d91edd3c5901ae39f2202.tar.xz |
anastasis-webui: auto-focus
Diffstat (limited to 'packages/anastasis-webui')
-rw-r--r-- | packages/anastasis-webui/src/routes/home/index.tsx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/anastasis-webui/src/routes/home/index.tsx b/packages/anastasis-webui/src/routes/home/index.tsx index 99f8febb4..c6bf15be6 100644 --- a/packages/anastasis-webui/src/routes/home/index.tsx +++ b/packages/anastasis-webui/src/routes/home/index.tsx @@ -585,10 +585,10 @@ function AuthMethodSmsSetup(props: AuthMethodSetupProps) { }, }); }; - //const inputRef = useRef<HTMLInputElement>(null); - // useLayoutEffect(() => { - // inputRef.current?.focus(); - // }, []); + const inputRef = useRef<HTMLInputElement>(null); + useLayoutEffect(() => { + inputRef.current?.focus(); + }, []); return ( <AnastasisClientFrame hideNav title="Add SMS authentication"> <div> @@ -601,7 +601,7 @@ function AuthMethodSmsSetup(props: AuthMethodSetupProps) { Mobile number:{" "} <input value={mobileNumber} - //ref={inputRef} + ref={inputRef} style={{ display: "block" }} autoFocus onChange={(e) => setMobileNumber((e.target as any).value)} |