diff --git a/packages/taler-merchant-webui/src/screens/ChangeServerUrlScreen.tsx b/packages/taler-merchant-webui/src/screens/ChangeServerUrlScreen.tsx index 6a208d7e3..a80fce845 100644 --- a/packages/taler-merchant-webui/src/screens/ChangeServerUrlScreen.tsx +++ b/packages/taler-merchant-webui/src/screens/ChangeServerUrlScreen.tsx @@ -16,7 +16,7 @@ import { ActionFooter } from "../ui/FormActionFooter.js"; import type { VNode } from "preact"; -import { useState } from "preact/hooks"; +import { useEffect, useRef, useState } from "preact/hooks"; import { TalerLogo } from "../ui/TalerLogo.js"; import { CopyErrorButton } from "../ui/CopyErrorButton.js"; import { currentBackendUrl, setCustomBackendUrl } from "../stores/session.js"; @@ -73,6 +73,11 @@ export function ChangeServerUrlScreen({ const [url, setUrl] = useState(initialUrl || currentBackendUrl.value); const [errorMsg, setErrorMsg] = useState(""); const [isVerifying, setIsVerifying] = useState(false); + // The address is what this page is for. + const urlInput = useRef(null); + useEffect(() => { + urlInput.current?.focus(); + }, []); const handleSubmit = async (e: Event) => { e.preventDefault(); @@ -193,6 +198,7 @@ export function ChangeServerUrlScreen({ {t`Server address`} *