View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0012009 | 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 | 0012009: Merchant: admin 'Reset merchant account password' page does not focus New password | ||||
| Description | What happens: Admin -> account -> reset password: a page whose only purpose is entering the new password twice; nothing is focused (BODY). Expected: Focus New password. Where: - packages/taler-merchant-webui/src/screens/AdminAccountCredentialsScreen.tsx:42 Measured in headless Chromium (document.activeElement): before: BODY after: INPUT#admin-reset-password[password] Proposed fix: Form ref + mount effect calling focusFirstEmptyField (from src/utils/focus.ts), since PasswordInput does not forward a ref. 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; screenshot confirms. Depends on the untracked src/utils/focus.ts (focusFirstEmptyField). | ||||
| Tags | No tags attached. | ||||
| Attached Files | merchant-a--admin-reset-password.diff (1,803 bytes)
diff --git a/packages/taler-merchant-webui/src/screens/AdminAccountCredentialsScreen.tsx b/packages/taler-merchant-webui/src/screens/AdminAccountCredentialsScreen.tsx
index 8e4c5b9d0..f56d23b40 100644
--- a/packages/taler-merchant-webui/src/screens/AdminAccountCredentialsScreen.tsx
+++ b/packages/taler-merchant-webui/src/screens/AdminAccountCredentialsScreen.tsx
@@ -9,11 +9,12 @@
import { FormActionFooter, useFormFeedback } from "../ui/FormActionFooter.js";
import type { VNode } from "preact";
-import { useState } from "preact/hooks";
+import { useEffect, useRef, useState } from "preact/hooks";
import { Header } from "../ui/Header.js";
import { Button } from "../ui/Button.js";
import { PasswordInput } from "../ui/PasswordInput.js";
import { useTranslation } from "../context/translation.js";
+import { focusFirstEmptyField } from "../utils/focus.js";
export function AdminAccountCredentialsScreen({
instanceId,
@@ -37,6 +38,11 @@ export function AdminAccountCredentialsScreen({
fieldError,
} = useFormFeedback();
const [pending, setPending] = useState(false);
+ // The new password is all this page asks for.
+ const form = useRef<HTMLFormElement>(null);
+ useEffect(() => {
+ focusFirstEmptyField(form.current);
+ }, []);
const submit = async (event: Event) => {
event.preventDefault();
@@ -79,6 +85,7 @@ export function AdminAccountCredentialsScreen({
<div class="rounded-lg border border-amber-300 bg-amber-50 p-4 text-sm text-amber-950">{t`The account’s existing password will stop working. Existing login tokens remain governed by the backend’s token policy.`}</div>
<form
+ ref={form}
onSubmit={(event) => void submit(event)}
class="space-y-5 rounded-xl border border-gray-200 bg-white p-5"
>
| ||||
| 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--admin-reset-password.diff | |
| 2026-11-10 23:43 | bot-cg | File Added: merchant-a--admin-reset-password--before.png | |
| 2026-11-10 23:43 | bot-cg | File Added: merchant-a--admin-reset-password--after.png |