fix(accounts): release row focus after Escape

Blur the focused account row only when Escape clears an active account selection. This prevents Chromium focus-visible styling from leaving a thick clipped blue outline while retaining accessible focus indicators during normal keyboard navigation.
This commit is contained in:
Sucukdeluxe
2026-08-15 02:00:54 +02:00
parent b5854a2227
commit 90fc77f203
3 changed files with 33 additions and 3 deletions
+10
View File
@@ -28,6 +28,16 @@ export function resolveEscapeSelectionScope(
return view === "settings" && settingsSection === "accounts" ? "accounts" : null;
}
export function releaseAccountSelectionFocus(
activeElement: { closest: (selector: string) => unknown; blur: () => void } | null
): boolean {
if (!activeElement?.closest(".settings-account-row")) {
return false;
}
activeElement.blur();
return true;
}
/**
* Drop selected ids whose package OR item no longer exists in the session.
* The selection set mixes package and item ids; when entries vanish (delta