summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-10-13 19:34:54 +0200
committerFlorian Dold <florian@dold.me>2021-10-13 19:34:54 +0200
commit6f4c0a6fb244b8e42b6d91edd3c5901ae39f2202 (patch)
treeb429b9adc1892a17993558d58f9da12f0bde23f2 /packages
parent3aad5e774dc44fc0d757f6c22152fcbb2b54ca1b (diff)
downloadwallet-core-6f4c0a6fb244b8e42b6d91edd3c5901ae39f2202.tar.gz
wallet-core-6f4c0a6fb244b8e42b6d91edd3c5901ae39f2202.tar.bz2
wallet-core-6f4c0a6fb244b8e42b6d91edd3c5901ae39f2202.zip
anastasis-webui: auto-focus
Diffstat (limited to 'packages')
-rw-r--r--packages/anastasis-webui/src/routes/home/index.tsx10
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)}