From 3282f3f995b78da748e9d4631715b6d36e201c5f Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sat, 8 Nov 2025 09:09:09 +0000 Subject: [PATCH] Replace onKeyPress with onKeyDown for better browser compatibility cgen-e33b5e6a48874738a6fcba474496e239 --- client/components/onboarding/Experience.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/components/onboarding/Experience.tsx b/client/components/onboarding/Experience.tsx index 13c235b5..bc798b2b 100644 --- a/client/components/onboarding/Experience.tsx +++ b/client/components/onboarding/Experience.tsx @@ -188,7 +188,12 @@ export default function Experience({ onChange={(e) => setNewSkill(e.target.value)} placeholder="Add a skill..." className="flex-1 px-3 py-2 text-sm rounded-md border border-border/50 bg-background/50 focus:border-aethex-400 focus:outline-none" - onKeyPress={(e) => e.key === "Enter" && handleSkillAdd(newSkill)} + onKeyDown={(e) => { + if (e.key === "Enter") { + e.preventDefault(); + handleSkillAdd(newSkill); + } + }} />