View Issue Details

IDProjectCategoryView StatusLast Update
0012044Talerchallengerpublic2026-11-18 17:07
Reporterbot-cg [agent]  
CommunicatorCM_7  
PrioritynormalSeveritytrivial 
Status closedResolutionfixed 
Target Version1.6Fixed in Version1.6 
Summary0012044: Challenger: address entry form (email/phone/postal, initial and change) does not focus its first field
DescriptionWhat happens:
Routing passes `focus` to AskChallenge for #/ask and #/change, but AskChallengeInternal never used it, and FormUI would not use it either: web-util's InputLine ignores the `focus` property (its doAutoFocus ref is commented out with a FIXME). The page is a single-purpose step whose only task is typing the address, yet nothing was focused. Measured: #/ask email/phone/postal/postal-ch = BODY. 'Use a different email address' from the code page -> #/change = BODY.

Expected:
Focus is on the first editable address field: CONTACT_EMAIL, CONTACT_PHONE, or CONTACT_NAME for postal. On the change form this is the prefilled field the user must edit. Nothing is focused when the address is fixed (all fields disabled) or in locked mode (no form).

Where:
  - packages/challenger-webui/src/pages/AskChallenge.tsx:584

Measured in headless Chromium (document.activeElement):
  before: BODY (ask-email, ask-phone, ask-postal, ask-postal-ch, change-email)
  after: INPUT[name=CONTACT_EMAIL] (ask-email, change-email); INPUT[name=CONTACT_PHONE] (ask-phone); INPUT[name=CONTACT_NAME] (ask-postal, ask-postal-ch); BODY with fix_address (all disabled). Focus is not re-applied: after typing, tabbing to ADDRESS_LINES and typing, 1.5 s later focus is still on the TEXTAREA. More screenshots: challenger--ask-{email,phone,postal,postal-ch}--{before,after}.png

Depends on: "web-util: Forms: `<FormUI focus>` and the per-field `focus` prop never focus anything" (sibling issue in this tree); without it this fix has no effect.

Proposed fix:
AskChallenge passes its existing `focus` prop on to FormUI. With the web-util form-framework fix (filed separately), FormUI focuses the first visible, enabled field once on mount; a fixed address renders every field disabled, so nothing is focused then.

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 --noEmit ok; eslint + prettier clean; challenger-flow.test.js 12/12 pass; rendered in Chromium for all four address types and for the change form, before and after
TagsNo tags attached.
Attached Files
challenger--address-form-focus.diff (551 bytes)   
diff --git a/packages/challenger-webui/src/pages/AskChallenge.tsx b/packages/challenger-webui/src/pages/AskChallenge.tsx
index 099ae1869..a5801fef5 100644
--- a/packages/challenger-webui/src/pages/AskChallenge.tsx
+++ b/packages/challenger-webui/src/pages/AskChallenge.tsx
@@ -576,6 +576,7 @@ function AskChallengeInternal({
             <FormUI
               design={design}
               model={form.model}
+              focus={focus}
               onSubmit={sendArgs ? () => send.run(...sendArgs) : undefined}
             />
           </div>

Required notifications

Address or linkRemarkAdded byNotifiedActions

Relationships

related to 0012057 closed web-util: Forms: `<FormUI focus>` and the per-field `focus` prop never focus anything 
child of 0012024 closed 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 

Activities

bot-codex-florian-dold

2026-11-13 09:13

manager   ~0030491

commit fb42fd4355e0f9dc8380fcdee369a640fce00ee8
Author: Florian Dold <dold@taler.net>
Date: Fri Nov 13 01:06:16 2026 +0100

    challenger web UI: focus address and code steps once
    
    Focus the first editable setup or address field. Key code focus by the
    challenge session so resend countdowns do not move the cursor.
    
    Issue: https://bugs.taler.net/n/12043
    Issue: https://bugs.taler.net/n/12044
    Issue: https://bugs.taler.net/n/12045
    Assisted-by: LLM

commit bee154f5ddb07d01986a5ddf830a5105fbf0ae1f
Author: Florian Dold <dold@taler.net>
Date: Fri Nov 13 01:06:16 2026 +0100

    web-util: honour form focus on one editable control
    
    FormUI chooses one field across all visible sections. Each field exposes
    its primary control to the form; standalone fields keep their focus
    flag.
    
    Issue: https://bugs.taler.net/n/12057
    Assisted-by: LLM

Issue History

Date ModifiedUsernameFieldChange
2026-11-10 23:42bot-cgNew Issue
2026-11-10 23:42bot-cgRelationship addedchild of 0012024
2026-11-10 23:42bot-cgRelationship addedrelated to 0012057
2026-11-10 23:43bot-cgFile Added: challenger--address-form-focus.diff
2026-11-10 23:43bot-cgFile Added: challenger--change-email--before.png
2026-11-10 23:43bot-cgFile Added: challenger--change-email--after.png
2026-11-11 16:29Christian GrothoffSeverityminor => trivial
2026-11-13 09:13bot-codex-florian-doldNote Added: 0030491
2026-11-13 09:13bot-codex-florian-doldStatusnew => closed
2026-11-13 09:13bot-codex-florian-doldResolutionopen => fixed
2026-11-18 17:02Christian GrothoffTarget Version => 1.6
2026-11-18 17:07Christian GrothoffFixed in Version => 1.6