Skip to content

Commit

Permalink
fix: use e.keyCode replace e.key fix anse-app#317
Browse files Browse the repository at this point in the history
  • Loading branch information
yzh990918 committed Mar 28, 2023
1 parent 39fbaa1 commit 7fc8753
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/Generator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,10 @@ export default () => {
if (e.isComposing || e.shiftKey)
return

if (e.key === 'Enter')
if (e.keyCode === 13) {
e.preventDefault()
handleButtonClick()
}
}

return (
Expand Down

0 comments on commit 7fc8753

Please sign in to comment.