From 0c849c9525b2e50506abc483f6a5d6fec6909c34 Mon Sep 17 00:00:00 2001 From: Marco Date: Thu, 23 Jul 2026 20:22:11 +0000 Subject: [PATCH] Drop select-all on unconfirmed VAT ID, keep the refocus MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Re-focus still returns attention to the field, but no longer wipes the customer's input via select() — a stray keystroke while glancing at the error message shouldn't erase what they typed. Co-Authored-By: Claude Sonnet 5 --- app/checkout/components/CheckoutContent.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/checkout/components/CheckoutContent.tsx b/app/checkout/components/CheckoutContent.tsx index efafb2e..f0e5db9 100644 --- a/app/checkout/components/CheckoutContent.tsx +++ b/app/checkout/components/CheckoutContent.tsx @@ -393,13 +393,10 @@ export function CheckoutContent({ return; } setVatIdViesStatus(data.valid ? "valid" : "invalid"); - // Re-focus + select the whole value on an unconfirmed VAT ID — the - // customer almost certainly needs to retype it (a typo, or the - // wrong id entirely), so the next keystroke should just replace it - // outright rather than requiring a manual select-all first. + // Re-focus (no select-all) on an unconfirmed VAT ID so the customer's + // attention returns to the field without wiping what they typed. if (!data.valid) { input.focus(); - input.select(); } } catch { setVatIdViesStatus("unavailable");