From 6f4c0a6fb244b8e42b6d91edd3c5901ae39f2202 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 13 Oct 2021 19:34:54 +0200 Subject: [PATCH] anastasis-webui: auto-focus --- packages/anastasis-webui/src/routes/home/index.tsx | 10 +++++----- 1 file 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(null); - // useLayoutEffect(() => { - // inputRef.current?.focus(); - // }, []); + const inputRef = useRef(null); + useLayoutEffect(() => { + inputRef.current?.focus(); + }, []); return (
@@ -601,7 +601,7 @@ function AuthMethodSmsSetup(props: AuthMethodSetupProps) { Mobile number:{" "} setMobileNumber((e.target as any).value)}