View Issue Details

IDProjectCategoryView StatusLast Update
0012018Talermerchant portal webuipublic2026-11-10 23:43
Reporterbot-cg [agent] Assigned ToResolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicatorCM_7  
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
Summary0012018: Merchant: Add/Edit Product Group and Money Pot dialogs focus the close button instead of the identifier
DescriptionWhat happens:
Reports -> 'Report Groupings' tab -> '+ Add product group' (or 'Add Money Pot', or Edit on a row) opens a Modal. Modal's initial focus took the first match of one selector list in document order, which is the title bar's close '✕' button (and a 'Reset to suggested' button also precedes the input).

Expected:
The identifier input (#grp_name_input / #pot_name_input) has focus.

Where:
  - packages/taler-merchant-webui/src/screens/ReportsScreen.tsx:896
  - packages/taler-merchant-webui/src/screens/ReportsScreen.tsx:978

Measured in headless Chromium (document.activeElement):
  before: BUTTON 'Close' (✕) for both dialogs
  after: INPUT#grp_name_input / INPUT#pot_name_input (measured with the in-tree Modal.tsx change)

Depends on: "Merchant: every Modal dialog opens on its close button instead of its first field, and ignores [autofocus]" (sibling issue in this tree); without it this fix has no effect.

Proposed fix:
Marks both identifier inputs with `autofocus`. DEPENDS on the shared Modal.tsx fix (owned by another agent, now in the tree) that gives [autofocus] priority; that change's 'first text field' fallback would also pick these inputs, so the marks make the intended target explicit rather than heuristic.

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 for file; ReportsScreen.state.test.js and Modal.test.js pass; screenshot confirms (after shot includes the other agent's Modal change)
TagsNo tags attached.
Attached Files
merchant-b--reports-group-pot-dialogs.diff (915 bytes)   
diff --git a/packages/taler-merchant-webui/src/screens/ReportsScreen.tsx b/packages/taler-merchant-webui/src/screens/ReportsScreen.tsx
index be4beee5e..3aaa50e33 100644
--- a/packages/taler-merchant-webui/src/screens/ReportsScreen.tsx
+++ b/packages/taler-merchant-webui/src/screens/ReportsScreen.tsx
@@ -893,6 +893,7 @@ export function ReportsScreen({
                 id="grp_name_input"
                 type="text"
                 required
+                autofocus
                 value={groupName}
                 onInput={(e) =>
                   setGroupName((e.target as HTMLInputElement).value)
@@ -974,6 +975,7 @@ export function ReportsScreen({
                 id="pot_name_input"
                 type="text"
                 required
+                autofocus
                 value={potName}
                 onInput={(e) =>
                   setPotName((e.target as HTMLInputElement).value)

Required notifications

Address or linkRemarkAdded byNotifiedActions

Relationships

related to 0012004 new Merchant: every Modal dialog opens on its close button instead of its first field, and ignores [autofocus] 
child of 0012002 new Merchant portal: dialogs, PIN/code prompts and single-purpose forms open without keyboard focus on the obvious field 

Activities

Issue History

Date ModifiedUsernameFieldChange
2026-11-10 23:41bot-cgNew Issue
2026-11-10 23:41bot-cgRelationship addedchild of 0012002
2026-11-10 23:41bot-cgRelationship addedrelated to 0012004
2026-11-10 23:43bot-cgFile Added: merchant-b--reports-group-pot-dialogs.diff
2026-11-10 23:43bot-cgFile Added: merchant-b--reports-group-pot-dialogs--before.png
2026-11-10 23:43bot-cgFile Added: merchant-b--reports-group-pot-dialogs--after.png