View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0012029 | Taler | exchange AML officer webui | public | 2026-11-10 23:42 | 2026-11-10 23:42 |
| 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 | 0012029: AML decision wizard: 'Create custom measure' does not focus the Name field | ||||
| Description | What happens: In step 4 ('Immediate measures'), 'Add custom measure', or 'Customize a copy' on an exchange measure, replaces the step content with the 'Create custom measure' form (or the guided verification editor for e-mail/phone/postal templates). The button that was clicked is removed, so focus falls back to BODY and the officer has to find the Name field. With 'Customize a copy' the name is prefilled with the original, which collides and has to be changed. Expected: The Name input, the first field of both editors, is focused when a new measure is being created. Where: - packages/taler-exchange-aml-webui/src/components/NewMeasure.tsx:280 - packages/taler-exchange-aml-webui/src/components/NewMeasure.tsx:476 Measured in headless Chromium (document.activeElement): before: BODY (nothing focused) after: INPUT[name=name] 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: Pass `focus={addingNew}` to the FormUI of NormalMeasureForm and VerificationMeasureForm. Editing an existing custom measure does not take focus. There the name is locked, and the framework would skip to 'Program', a combobox whose option list pops open on focus. A short comment explains this. 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; AML unit tests 69/69; screenshot (ImmediateMeasures story, after clicking 'Add custom measure'); typing into the Program combobox afterwards keeps focus there | ||||
| Tags | No tags attached. | ||||
| Attached Files | aml--new-measure.diff (1,703 bytes)
diff --git a/packages/taler-exchange-aml-webui/src/components/NewMeasure.tsx b/packages/taler-exchange-aml-webui/src/components/NewMeasure.tsx
index ef87d75bd..df96bc2d6 100644
--- a/packages/taler-exchange-aml-webui/src/components/NewMeasure.tsx
+++ b/packages/taler-exchange-aml-webui/src/components/NewMeasure.tsx
@@ -272,7 +272,14 @@ function NormalMeasureForm({
</i18n.Translate>
</p>
</div>
- <FormUI design={design} model={form.model} onSubmit={submitMeasure} />
+ {/* Only a new measure needs a name typed first; when editing, the
+ name is locked and the next field is a list that pops open. */}
+ <FormUI
+ design={design}
+ model={form.model}
+ focus={addingNew}
+ onSubmit={submitMeasure}
+ />
<div class="flex flex-wrap gap-3 border-t border-gray-200 pt-5 dark:border-gray-700">
<button type="button" onClick={onCancel} class={secondaryButtonClass}>
<i18n.Translate>Cancel</i18n.Translate>
@@ -461,7 +468,14 @@ function VerificationMeasureForm({
return (
<div class="space-y-6">
- <FormUI design={design} model={form.model} onSubmit={submitMeasure} />
+ {/* Only a new measure needs a name typed first; when editing, the
+ name is locked and the next field is a list that pops open. */}
+ <FormUI
+ design={design}
+ model={form.model}
+ focus={addingNew}
+ onSubmit={submitMeasure}
+ />
<div class="flex flex-wrap gap-3 border-t border-gray-200 pt-5 dark:border-gray-700">
<button type="button" onClick={onCancel} class={secondaryButtonClass}>
<i18n.Translate>Cancel</i18n.Translate>
| ||||
| 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:42 | bot-cg | Relationship added | related to 0012057 |
| 2026-11-10 23:42 | bot-cg | File Added: aml--new-measure.diff | |
| 2026-11-10 23:42 | bot-cg | File Added: aml--new-measure--before.png | |
| 2026-11-10 23:42 | bot-cg | File Added: aml--new-measure--after.png |