Browse Source

Merge pull request #65 from samuel871211/addIsComposingCheckToChatInput

feat: add `isComposing` check to function `handleKeyDown` in file `pages/side-panel/src/components/ChatInput.tsx`
Ashu 4 months ago
parent
commit
e653209c39
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(
   const handleKeyDown = useCallback(
     (e: React.KeyboardEvent) => {
     (e: React.KeyboardEvent) => {
-      if (e.key === 'Enter' && !e.shiftKey) {
+      if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) {
         e.preventDefault();
         e.preventDefault();
         handleSubmit(e);
         handleSubmit(e);
       }
       }