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:
nogataka
2026-01-28 12:59:14 +09:00
parent 910ca34eac
commit 80c15a534d
5 changed files with 10 additions and 5 deletions

View File

@@ -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('')