Replace onKeyPress with onKeyDown for better browser compatibility
cgen-e33b5e6a48874738a6fcba474496e239
This commit is contained in:
parent
840602ceff
commit
3282f3f995
1 changed files with 6 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
size="sm"
|
||||
|
|
|
|||
Loading…
Reference in a new issue