From d23b739abdbc922ae5ef19dde3a3302a55d1cbc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=91=98=E9=98=BF=E6=B1=9F=28Relakkes?= =?UTF-8?q?=29?= Date: Tue, 7 Apr 2026 22:21:57 +0800 Subject: [PATCH] fix: resolve EmptySession popup positioning and IME composition conflicts Fix FileSearchMenu and slash command popups appearing incorrectly in EmptySession by adding relative positioning to container and absolute positioning to slash menu. Prevent IME composition Enter from triggering message send in both ChatInput and EmptySession. Co-Authored-By: Claude Opus 4.6 (1M context) --- desktop/src/components/chat/ChatInput.tsx | 3 +++ desktop/src/pages/EmptySession.tsx | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/desktop/src/components/chat/ChatInput.tsx b/desktop/src/components/chat/ChatInput.tsx index 903cf802..9da3a06f 100644 --- a/desktop/src/components/chat/ChatInput.tsx +++ b/desktop/src/components/chat/ChatInput.tsx @@ -220,6 +220,9 @@ export function ChatInput() { } const handleKeyDown = (event: React.KeyboardEvent) => { + // Ignore key events during IME composition (e.g. Chinese input method) + if (event.nativeEvent.isComposing) return + // Route file search navigation keys to FileSearchMenu if (fileSearchOpen) { const key = event.key diff --git a/desktop/src/pages/EmptySession.tsx b/desktop/src/pages/EmptySession.tsx index a20e6d9c..3c49d504 100644 --- a/desktop/src/pages/EmptySession.tsx +++ b/desktop/src/pages/EmptySession.tsx @@ -181,6 +181,9 @@ export function EmptySession() { } const handleKeyDown = (event: React.KeyboardEvent) => { + // Ignore key events during IME composition (e.g. Chinese input method) + if (event.nativeEvent.isComposing) return + // Route file search navigation keys to FileSearchMenu if (fileSearchOpen) { const key = event.key @@ -347,7 +350,7 @@ export function EmptySession() {
event.preventDefault()} onDrop={handleDrop} @@ -377,7 +380,7 @@ export function EmptySession() { {slashMenuOpen && filteredCommands.length > 0 && (
{filteredCommands.map((command, index) => (