Parcourir la source

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

yushengchen il y a 4 mois
Parent
commit
8821ecd023
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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);
       }