View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0012006 | 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 | 0012006: Merchant: Bank monitoring dialog stays on its close button after its settings load | ||||
| Description | What happens: Bank accounts -> 'Bank monitoring' opens Modal while settings load, so Modal (correctly) focuses ✕; when the form replaces 'Loading…' focus stays on ✕ (measured BUTTON Close both with monitoring on and off). Expected: Once the settings are shown, start on the first setting: the Bank history URL when monitoring is on, the enable checkbox otherwise. Where: - packages/taler-merchant-webui/src/screens/BankMonitoringDialog.tsx:140 Measured in headless Chromium (document.activeElement): before: BUTTON Close after: INPUT#bank-monitoring-url (monitoring on) / INPUT#bank-monitoring-enabled (monitoring off) Proposed fix: BankMonitoringForm focuses a ref on mount (it mounts only once the settings arrived); the ref sits on #bank-monitoring-url when enabled, else on #bank-monitoring-enabled. 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; screenshots bank-monitoring and bank-monitoring-off before/after; screens/bankMonitoring.test has the same 4 pre-existing env failures with and without the change | ||||
| Tags | No tags attached. | ||||
| Attached Files | merchant-a--bank-monitoring-dialog.diff (1,510 bytes)
diff --git a/packages/taler-merchant-webui/src/screens/BankMonitoringDialog.tsx b/packages/taler-merchant-webui/src/screens/BankMonitoringDialog.tsx
index d8d6bf0af..4a6f5ab4d 100644
--- a/packages/taler-merchant-webui/src/screens/BankMonitoringDialog.tsx
+++ b/packages/taler-merchant-webui/src/screens/BankMonitoringDialog.tsx
@@ -134,6 +134,13 @@ function BankMonitoringForm({
} = useFormFeedback();
const fieldClass =
"mt-1 w-full rounded-md border border-gray-300 px-3 py-2 text-sm";
+ // The dialog opened on its close button while the settings loaded; now that
+ // they are here, start on the first setting: the history URL when
+ // monitoring is on, the switch that turns it on otherwise.
+ const firstField = useRef<HTMLInputElement>(null);
+ useEffect(() => {
+ firstField.current?.focus();
+ }, []);
return (
<form
class="space-y-4"
@@ -201,6 +208,7 @@ function BankMonitoringForm({
<fieldset disabled={saving} class="space-y-4">
<label class="flex items-center gap-2 text-sm font-medium">
<input
+ ref={enabled ? undefined : firstField}
id="bank-monitoring-enabled"
type="checkbox"
checked={enabled}
@@ -216,6 +224,7 @@ function BankMonitoringForm({
>
{t`Bank history URL`}
<input
+ ref={firstField}
{...fieldProps("bank-monitoring-url")}
id="bank-monitoring-url"
type="url"
| ||||
| 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--bank-monitoring-dialog.diff | |
| 2026-11-10 23:43 | bot-cg | File Added: merchant-a--bank-monitoring--before.png | |
| 2026-11-10 23:43 | bot-cg | File Added: merchant-a--bank-monitoring--after.png |