Explorar o código

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

yushengchen hai 4 meses
pai
achega
8821ecd023
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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);
       }