Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Studio: guard project chat rename against IME composition keys (#7246)

Daniel Han127c69bcbba6
diff --git a/studio/frontend/src/features/chat/chat-page.tsx b/studio/frontend/src/features/chat/chat-page.tsx
index 3daae8c50df..16176f0f5fc 100644
--- a/studio/frontend/src/features/chat/chat-page.tsx
+++ b/studio/frontend/src/features/chat/chat-page.tsx
@@ -1395,9 +1395,17 @@ function ProjectLanding({
setRenameDraft(event.target.value)
}
onKeyDown={(event) => {
+ // Ignore keydowns fired mid-IME-composition (CJK)
+ // so a candidate-confirming Enter or candidate-
+ // cancelling Escape does not commit/cancel the
+ // rename. Guard before the key branch so Escape is
+ // covered too (isComposing on WebKit, 229 on Chromium).
+ if (
+ event.nativeEvent.isComposing ||
+ event.keyCode === 229
+ )
+ return;
if (event.key === "Enter") {
- if (event.nativeEvent.isComposing || event.keyCode === 229)
- return;
event.preventDefault();
skipRenameBlurRef.current = true;
void commitRename(item);