View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0012023 | 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 | 0012023: Merchant: 'You have been signed out' page does not focus 'Sign In Again' | ||||
| Description | What happens: When the backend rejects the session (401), App replaces everything with UnauthorizedScreen. Its single action is 'Sign In Again'; nothing is focused (BODY). Expected: 'Sign In Again' focused, so Enter continues. Where: - packages/taler-merchant-webui/src/screens/UnauthorizedScreen.tsx:49 - packages/taler-merchant-webui/src/screens/UnauthorizedScreen.tsx:96 Measured in headless Chromium (document.activeElement): before: BODY after: BUTTON 'Sign In Again' Proposed fix: Ref on the button and a mount-only effect that focuses it. 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; screens.test.js passes; screenshot confirms; tutorial chapter 4 preview does not steal focus (guard case) | ||||
| Tags | No tags attached. | ||||
| Attached Files | merchant-b--unauthorized-screen.diff (1,290 bytes)
diff --git a/packages/taler-merchant-webui/src/screens/UnauthorizedScreen.tsx b/packages/taler-merchant-webui/src/screens/UnauthorizedScreen.tsx
index bbc370df1..c88323153 100644
--- a/packages/taler-merchant-webui/src/screens/UnauthorizedScreen.tsx
+++ b/packages/taler-merchant-webui/src/screens/UnauthorizedScreen.tsx
@@ -15,6 +15,7 @@
*/
import type { VNode } from "preact";
+import { useEffect, useRef } from "preact/hooks";
import { TalerLogo } from "../ui/TalerLogo.js";
import { useTranslation } from "../context/translation.js";
import { RawLayout } from "../ui/RawLayout.js";
@@ -44,6 +45,11 @@ export function UnauthorizedScreen({
"Your session token was rejected by the server (HTTP 401 Unauthorized)."
? t`Your session token was rejected by the server (HTTP 401 Unauthorized).`
: errorDetail;
+ // Signing in again is the only thing to do here.
+ const signInAgain = useRef<HTMLButtonElement>(null);
+ useEffect(() => {
+ signInAgain.current?.focus();
+ }, []);
return (
<RawLayout>
@@ -87,6 +93,7 @@ export function UnauthorizedScreen({
<div class="pt-2">
<button
+ ref={signInAgain}
type="button"
onClick={() => {
if (onSignInAgain) {
| ||||
| child of | 0012002 | closed | Merchant portal: dialogs, PIN/code prompts and single-purpose forms open without keyboard focus on the obvious field |
| commit 4bf1b24fba1731d01ba25153beef6d53e0bbd103 Author: Florian Dold <dold@taler.net> Date: Fri Nov 13 01:06:16 2026 +0100 merchant web UI: focus authentication fields and code steps Focus the field each authentication step asks for. Use the challenge ID to focus a new code prompt without remounting it or reacting to countdowns. Issue: https://bugs.taler.net/n/12003 Issue: https://bugs.taler.net/n/12023 Assisted-by: LLM commit c1ee0c1022645200e605a3f36ab4910a3750c180 Author: Florian Dold <dold@taler.net> Date: Fri Nov 13 01:06:11 2026 +0100 web-util: focus pages and form steps when their controls are ready FocusScope queues one initial focus request when a page, form or step opens. It waits for loading and cancels the request if the user moves focus. useFocusTarget retries pending focus when a control mounts. Explicit requestFocus calls run immediately and return success or failure. 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:43 | bot-cg | File Added: merchant-b--unauthorized-screen.diff | |
| 2026-11-10 23:43 | bot-cg | File Added: merchant-b--unauthorized-screen--before.png | |
| 2026-11-10 23:43 | bot-cg | File Added: merchant-b--unauthorized-screen--after.png | |
| 2026-11-11 16:28 | Christian Grothoff | Severity | tweak => trivial |
| 2026-11-13 09:11 | bot-codex-florian-dold | Note Added: 0030472 | |
| 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 |