Browse Source

feat: add `isComposing` check to function `handleKeyDown` in file `pages/side-panel/src/components/ChatInput.tsx`

yushengchen 4 months ago
parent
commit
8821ecd023
1 changed files with 1 additions and 1 deletions
  1. 1 1
      pages/side-panel/src/components/ChatInput.tsx

+ 1 - 1
pages/side-panel/src/components/ChatInput.tsx

@@ -62,7 +62,7 @@ export default function ChatInput({
 
   const handleKeyDown = useCallback(
     (e: React.KeyboardEvent) => {
-      if (e.key === 'Enter' && !e.shiftKey) {
+      if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) {
         e.preventDefault();
         handleSubmit(e);
       }