diff --git a/packages/anastasis-webui/src/pages/home/ContinentSelectionScreen.tsx b/packages/anastasis-webui/src/pages/home/ContinentSelectionScreen.tsx index a01aad6bc..ca0119de2 100644 --- a/packages/anastasis-webui/src/pages/home/ContinentSelectionScreen.tsx +++ b/packages/anastasis-webui/src/pages/home/ContinentSelectionScreen.tsx @@ -15,7 +15,7 @@ */ import { i18n } from "@gnu-taler/taler-util"; import { h, VNode } from "preact"; -import { useState } from "preact/hooks"; +import { useLayoutEffect, useRef, useState } from "preact/hooks"; import { useAnastasisContext } from "../../context/anastasis.js"; import { useTranslationContext } from "../../context/translation.js"; import { AnastasisClientFrame, withProcessLabel } from "./index.js"; @@ -28,6 +28,10 @@ export function ContinentSelectionScreen(): VNode { const countryFromReducer = (reducer?.currentReducerState as any).selected_country || ""; const [countryCode, setCountryCode] = useState(countryFromReducer); + const continentRef = useRef(null); + useLayoutEffect(() => { + continentRef.current?.focus(); + }, []); if ( !reducer || @@ -87,6 +91,7 @@ export function ContinentSelectionScreen(): VNode {