View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0012010 | Taler | merchant portal webui | public | 2026-11-10 23:41 | 2026-11-10 23:43 |
| Reporter | bot-cg [agent] | Assigned To | Resolution deadline | ||
| Implementer | Reviewer | ||||
| Release signed by | Deployed by | ||||
| Verifier | Communicator | CM_7 | |||
| Data protection authority notification required | No | ||||
| CSIRT notification required | No | ||||
| Estimated effort (hours) | Actual effort (hours) | 0 | |||
| Fast-track | No | ||||
| Work package | none | ||||
| Priority | normal | Severity | tweak | Reproducibility | have not tried |
| Status | new | Resolution | open | ||
| Summary | 0012010: Merchant: admin 'Create merchant account' form does not focus Account ID | ||||
| Description | What happens: Merchant accounts -> '+ Create merchant account' opens the create form; nothing is focused (BODY). Expected: In create mode focus Account ID; edit mode (ID locked, no obvious first field) unchanged. Where: - packages/taler-merchant-webui/src/screens/AdminAccountFormScreen.tsx:101 Measured in headless Chromium (document.activeElement): before: BODY after: INPUT#managed-account-id Proposed fix: Ref on #managed-account-id focused on mount when mode === 'create'. Patch against taler-typescript-core master attached; the same change is committed on branch dev/bots/autofocus (durian). Screenshots attached (focused element outlined in red): 'before' is master, 'after' is with the patch. Verified: tsc ok; eslint clean; screenshot confirms | ||||
| Tags | No tags attached. | ||||
| Attached Files | merchant-a--admin-create-account.diff (1,660 bytes)
diff --git a/packages/taler-merchant-webui/src/screens/AdminAccountFormScreen.tsx b/packages/taler-merchant-webui/src/screens/AdminAccountFormScreen.tsx
index 5fe1598f9..32e8e5eef 100644
--- a/packages/taler-merchant-webui/src/screens/AdminAccountFormScreen.tsx
+++ b/packages/taler-merchant-webui/src/screens/AdminAccountFormScreen.tsx
@@ -9,7 +9,7 @@
import { FormActionFooter, useFormFeedback } from "../ui/FormActionFooter.js";
import type { VNode } from "preact";
-import { useState } from "preact/hooks";
+import { useEffect, useRef, useState } from "preact/hooks";
import {
isValidMerchantInstanceId,
normalizeMerchantInstanceId,
@@ -96,6 +96,12 @@ function AdminAccountFormInner({
const { t } = useTranslation();
const [value, setValue] = useState<AdminAccountFormValue>(initial);
const [confirmPassword, setConfirmPassword] = useState("");
+ // A new account starts with its identifier. When editing, the identifier is
+ // fixed and no field in particular comes first.
+ const accountIdInput = useRef<HTMLInputElement>(null);
+ useEffect(() => {
+ if (mode === "create") accountIdInput.current?.focus();
+ }, [mode]);
const [showAdvancedRequested, setShowAdvanced] = useState(mode === "edit");
const [ignoreInvalidLogo, setIgnoreInvalidLogo] = useState(false);
const [customTiming, setCustomTiming] = useState(
@@ -256,6 +262,7 @@ function AdminAccountFormInner({
{t`Account ID`} *
</label>
<input
+ ref={accountIdInput}
{...fieldProps("managed-account-id")}
id="managed-account-id"
value={value.id}
| ||||
| child of | 0012002 | new | Merchant portal: dialogs, PIN/code prompts and single-purpose forms open without keyboard focus on the obvious field |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-11-10 23:41 | bot-cg | New Issue | |
| 2026-11-10 23:41 | bot-cg | Relationship added | child of 0012002 |
| 2026-11-10 23:43 | bot-cg | File Added: merchant-a--admin-create-account.diff | |
| 2026-11-10 23:43 | bot-cg | File Added: merchant-a--admin-create-account--before.png | |
| 2026-11-10 23:43 | bot-cg | File Added: merchant-a--admin-create-account--after.png |