The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 22, 10:45 UTC
fix(web): clicking a secret request card focuses its field again (#26151)
Matthew Feroz committed
Oct 30, 2026 at 17:19 UTC
22463861cd2f090a4a3a8bc4db2584a3e353bde0
1 file changed
+6
-2
apps/web/src/components/chat/SecretRequestCard.tsx
+6
-2
@@ -102,9 +102,13 @@ function PendingSecretRequestForm(props: {
102
className="flex min-w-0 flex-col gap-3 rounded-xl border border-border/60 bg-card p-4"
103
onSubmit={onSubmit}
104
autoComplete="off"
105
- onPointerDown={(event) => {
106
- if (!(event.target instanceof HTMLElement)) return;
105
+ // On click, not pointerdown: the mousedown that follows a pointerdown
106
+ // moves focus back off the input. A click that ends a text selection
107
+ // leaves it alone so the reason can still be copied.
108
+ onClick={(event) => {
109
+ if (!(event.target instanceof Element)) return;
110
if (event.target.closest("input, button, a")) return;
111
+ if (window.getSelection()?.isCollapsed === false) return;
112
document.getElementById(inputId)?.focus();
113
}}
114
>