View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0012018 | Taler | merchant portal webui | public | 2026-11-10 23:41 | 2026-11-18 17:07 |
| Reporter | bot-cg [agent] | ||||
| Communicator | CM_7 | ||||
| Priority | normal | Severity | trivial | ||
| Status | closed | Resolution | fixed | ||
| Target Version | 1.6 | Fixed in Version | 1.6 | ||
| Summary | 0012018: Merchant: Add/Edit Product Group and Money Pot dialogs focus the close button instead of the identifier | ||||
| Description | What 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) | ||||
| Tags | No 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)
| ||||
| commit 073d2e7f48bb3ba51738e900ae533a2e0dc80876 Author: Florian Dold <dold@taler.net> Date: Fri Nov 13 01:06:16 2026 +0100 merchant web UI: use shared focus handling for custom dialogs Move pairing, account removal, order deletion and template overlays to Modal. Keep their content and dismissal behavior, and mark the intended field in report-group dialogs. Issue: https://bugs.taler.net/n/12005 Issue: https://bugs.taler.net/n/12018 Issue: https://bugs.taler.net/n/12019 Issue: https://bugs.taler.net/n/12020 Issue: https://bugs.taler.net/n/12021 Assisted-by: LLM commit c58cf2ae54417fe5d5cab9075ff3d88e52f3796b Author: Florian Dold <dold@taler.net> Date: Fri Nov 13 01:06:16 2026 +0100 merchant web UI: share dialog and menu focus handling Let Modal choose its initial target and use DialogFocusScope for Tab, Escape and restoration. Keep confirmations on their safe action and pass the row menu trigger through menu-to-dialog handoffs. Issue: https://bugs.taler.net/n/12004 Assisted-by: LLM commit 0db14837db18a79a4bee3ca81c0137bc20c01f92 Author: Florian Dold <dold@taler.net> Date: Fri Nov 13 01:06:14 2026 +0100 web-util: restore dialog openers and coordinate nested dialogs DialogFocusScope adds Escape handling and opener restoration to a focus scope. Hooks provide the same behavior for existing wrappers. Menus restore focus without trapping it; native dialogs retain browser Tab handling. After an initial request succeeds, discard the other eligible requests, including ones tried earlier while their controls were unavailable. Keep requests blocked by a modal and requests waiting after fallback focus. Issue: https://bugs.taler.net/n/12002 Issue: https://bugs.taler.net/n/12024 Issue: https://bugs.taler.net/n/12034 Assisted-by: LLM commit fdb0b892c5ea5e4869edcc8b83fb43a707be2126 Author: Florian Dold <dold@taler.net> Date: Fri Nov 13 01:06:08 2026 +0100 web-util: add helpers for initial focus and modal keyboard handling Find controls that can receive focus, skipping hidden, disabled and inert elements. Choose a dialog's initial focus from an explicit target, an editable field, or its first control. Handle Escape on the active dialog. For custom modals, keep Tab inside and make the rest of the page inert so it cannot receive clicks or focus. Restore the previous inert state on close. Let the browser handle Tab in native dialogs, and allow focus to leave menus. Issue: https://bugs.taler.net/n/12002 Issue: https://bugs.taler.net/n/12024 Assisted-by: LLM | |
| 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:41 | bot-cg | Relationship added | related to 0012004 |
| 2026-11-10 23:43 | bot-cg | File Added: merchant-b--reports-group-pot-dialogs.diff | |
| 2026-11-10 23:43 | bot-cg | File Added: merchant-b--reports-group-pot-dialogs--before.png | |
| 2026-11-10 23:43 | bot-cg | File Added: merchant-b--reports-group-pot-dialogs--after.png | |
| 2026-11-11 08:25 | Christian Grothoff | Severity | minor => trivial |
| 2026-11-13 09:11 | bot-codex-florian-dold | Note Added: 0030467 | |
| 2026-11-13 09:12 | bot-codex-florian-dold | Status | new => closed |
| 2026-11-13 09:12 | bot-codex-florian-dold | Resolution | open => fixed |
| 2026-11-18 17:03 | Christian Grothoff | Target Version | => 1.6 |
| 2026-11-18 17:07 | Christian Grothoff | Fixed in Version | => 1.6 |