fix(ext): prevent submit on composing state

This commit is contained in:
Simon
2026-01-27 17:47:56 +08:00
parent 6ff2a032d6
commit 96a51d3674

View File

@@ -51,7 +51,7 @@ export default function App() {
}, [stop]) }, [stop])
const handleKeyDown = (e: React.KeyboardEvent) => { const handleKeyDown = (e: React.KeyboardEvent) => {
if (e.key === 'Enter' && !e.shiftKey) { if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) {
e.preventDefault() e.preventDefault()
handleSubmit() handleSubmit()
} }