diff --git a/ui/src/components/AssistantChat.tsx b/ui/src/components/AssistantChat.tsx index 8f438a1..a2d7ba8 100644 --- a/ui/src/components/AssistantChat.tsx +++ b/ui/src/components/AssistantChat.tsx @@ -134,7 +134,8 @@ export function AssistantChat({ } const handleKeyDown = (e: React.KeyboardEvent) => { - 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() } diff --git a/ui/src/components/ExpandProjectChat.tsx b/ui/src/components/ExpandProjectChat.tsx index 52926cb..2eb30b3 100644 --- a/ui/src/components/ExpandProjectChat.tsx +++ b/ui/src/components/ExpandProjectChat.tsx @@ -88,7 +88,8 @@ export function ExpandProjectChat({ } const handleKeyDown = (e: React.KeyboardEvent) => { - 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() handleSendMessage() } diff --git a/ui/src/components/FolderBrowser.tsx b/ui/src/components/FolderBrowser.tsx index c3e998a..8641bdd 100644 --- a/ui/src/components/FolderBrowser.tsx +++ b/ui/src/components/FolderBrowser.tsx @@ -269,7 +269,8 @@ export function FolderBrowser({ onSelect, onCancel, initialPath }: FolderBrowser className="flex-1" autoFocus onKeyDown={(e) => { - if (e.key === 'Enter') handleCreateFolder() + // Skip if composing (e.g., Japanese IME input) + if (e.key === 'Enter' && !e.nativeEvent.isComposing) handleCreateFolder() if (e.key === 'Escape') { setIsCreatingFolder(false) setNewFolderName('') diff --git a/ui/src/components/SpecCreationChat.tsx b/ui/src/components/SpecCreationChat.tsx index 1aa804a..24d0c09 100644 --- a/ui/src/components/SpecCreationChat.tsx +++ b/ui/src/components/SpecCreationChat.tsx @@ -127,7 +127,8 @@ export function SpecCreationChat({ } const handleKeyDown = (e: React.KeyboardEvent) => { - 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() handleSendMessage() } diff --git a/ui/src/components/TerminalTabs.tsx b/ui/src/components/TerminalTabs.tsx index 2771dec..760d69d 100644 --- a/ui/src/components/TerminalTabs.tsx +++ b/ui/src/components/TerminalTabs.tsx @@ -96,7 +96,8 @@ export function TerminalTabs({ // Handle key events during editing const handleKeyDown = useCallback( (e: React.KeyboardEvent) => { - if (e.key === 'Enter') { + // Skip if composing (e.g., Japanese IME input) + if (e.key === 'Enter' && !e.nativeEvent.isComposing) { e.preventDefault() submitEdit() } else if (e.key === 'Escape') {