mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-02-05 16:33:08 +00:00
fix: Prevent accidental message submission during IME composition
Add isComposing check to prevent Enter key from submitting messages while Japanese (or other) IME input is in progress. Affected components: - AssistantChat - ExpandProjectChat - SpecCreationChat - FolderBrowser - TerminalTabs
This commit is contained in:
@@ -134,7 +134,8 @@ export function AssistantChat({
|
||||
}
|
||||
|
||||
const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
|
||||
if (e.key === 'Enter' && !e.shiftKey) {
|
||||
// Skip if composing (e.g., Japanese IME input)
|
||||
if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) {
|
||||
e.preventDefault()
|
||||
handleSend()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user