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-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 | 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 | 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-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 |