Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

🔧 fix(useTextArea): Incorrect New Line while Composing Japanese Text (#3103)

Yuichi Oneda3172381bad4a
diff --git a/client/src/hooks/Input/useTextarea.ts b/client/src/hooks/Input/useTextarea.ts
index c86aee5b13..0e26070f49 100644
--- a/client/src/hooks/Input/useTextarea.ts
+++ b/client/src/hooks/Input/useTextarea.ts
@@ -182,7 +182,13 @@ export default function useTextarea({
e.preventDefault();
}
- if (e.key === 'Enter' && !enterToSend && !isCtrlEnter && textAreaRef.current) {
+ if (
+ e.key === 'Enter' &&
+ !enterToSend &&
+ !isCtrlEnter &&
+ textAreaRef.current &&
+ !isComposing?.current
+ ) {
e.preventDefault();
insertTextAtCursor(textAreaRef.current, '\n');
forceResize(textAreaRef.current);