View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0012052 | Taler | wallet (WebExtension) | public | 2026-11-10 23:42 | 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 | 0012052: Wallet: donation-receipt setup does not focus the field to fill in | ||||
| Description | What happens: On a payment offering a donation receipt, 'Configure donation receipts' navigates to #/donations?suggested=<donau>&returnTo=/pay/... with the authority URL prefilled; the user only has to enter the taxpayer identifier, but nothing is focused (BODY). Same for Settings -> Donation receipts when nothing is configured yet (URL field). Expected: While setting up (no configuration yet, or arriving with a suggested authority), focus the first field still to be entered: taxpayer ID when the URL is known, otherwise the URL. When already configured the page is an overview (totals list) and focus is left alone. Where: - packages/wallet-webui/src/screens/DonauSettingsScreen.tsx:50 Measured in headless Chromium (document.activeElement): before: BODY (nothing focused) after: INPUT#tax-payer-id (suggested flow); INPUT#donau-url when unconfigured (unit test only: the demo wallet is always configured) Proposed fix: Refs on both inputs; effect keyed on `settingUp` (loaded and unconfigured or suggested) and whether the URL is known, focusing with preventScroll. 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 (0 errors in wallet-webui with workspace sources; plain `tsc --noEmit -p .` output identical to baseline, whose errors come from stale taler-util/wallet-core lib/); eslint + prettier clean on changed files; package tests screens/exchange-removal/payment-entry/routing bundled from src: 89/95 pass, the same 6 App-level demo tests fail before and after; scratch test: unconfigured -> URL, suggested -> taxpayer, configured -> nothing; screenshot of suggested flow; configured #/donations still BODY. | ||||
| Tags | No tags attached. | ||||
| Attached Files | wallet--donau-settings.diff (2,119 bytes)
diff --git a/packages/wallet-webui/src/screens/DonauSettingsScreen.tsx b/packages/wallet-webui/src/screens/DonauSettingsScreen.tsx
index 0936486e6..13a2bf577 100644
--- a/packages/wallet-webui/src/screens/DonauSettingsScreen.tsx
+++ b/packages/wallet-webui/src/screens/DonauSettingsScreen.tsx
@@ -1,4 +1,4 @@
-import { useEffect, useState } from "preact/hooks";
+import { useEffect, useRef, useState } from "preact/hooks";
import { Button } from "../ui/Button.js";
import { Card } from "../ui/Card.js";
import { ErrorCard } from "../ui/ErrorCard.js";
@@ -47,6 +47,23 @@ export function DonauSettingsScreen(props: {
props.initialDonauBaseUrl,
]);
const valid = donauBaseUrl.trim() !== "" && taxPayerId.trim() !== "";
+ const urlInput = useRef<HTMLInputElement>(null);
+ const taxPayerInput = useRef<HTMLInputElement>(null);
+ const settingUp =
+ !props.loading &&
+ (props.configuration === undefined ||
+ props.initialDonauBaseUrl !== undefined);
+ const urlKnown = Boolean(
+ props.initialDonauBaseUrl ?? props.configuration?.donauBaseUrl,
+ );
+ // While nothing is configured, or when a payment sent the user here to set
+ // up a suggested authority, the form is the purpose of the page: focus the
+ // first field that still needs to be entered.
+ useEffect(() => {
+ if (!settingUp) return;
+ if (urlKnown) taxPayerInput.current?.focus({ preventScroll: true });
+ else urlInput.current?.focus({ preventScroll: true });
+ }, [settingUp, urlKnown]);
return (
<div class="space-y-5">
<div>
@@ -83,6 +100,7 @@ export function DonauSettingsScreen(props: {
i18n.str`Donation authority URL`
}</label>
<input
+ ref={urlInput}
id="donau-url"
type="url"
required
@@ -98,6 +116,7 @@ export function DonauSettingsScreen(props: {
i18n.str`Taxpayer identifier`
}</label>
<input
+ ref={taxPayerInput}
id="tax-payer-id"
type="text"
required
| ||||
| child of | 0012024 | new | Web UIs (bank, wallet, exchange AML/KYC, challenger, auditor, web-util forms): dialogs and single-purpose forms open without keyboard focus on the obvious field |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-11-10 23:42 | bot-cg | New Issue | |
| 2026-11-10 23:42 | bot-cg | Relationship added | child of 0012024 |
| 2026-11-10 23:43 | bot-cg | File Added: wallet--donau-settings.diff | |
| 2026-11-10 23:43 | bot-cg | File Added: wallet--donau-settings--before.png | |
| 2026-11-10 23:43 | bot-cg | File Added: wallet--donau-settings--after.png |