fix(web-ui): ignore key events during IME composition (#2982)
* fix(web-ui): ignore key events during IME composition * fix(web-ui): ignore key events during IME composition in ModelSelector
This commit is contained in:
@@ -60,6 +60,9 @@ export class MessageEditor extends LitElement {
|
||||
};
|
||||
|
||||
private handleKeyDown = (e: KeyboardEvent) => {
|
||||
// Ignore key events during IME composition (e.g. CJK input)
|
||||
if (e.isComposing || e.key === "Process") return;
|
||||
|
||||
if (e.key === "Enter" && !e.shiftKey) {
|
||||
e.preventDefault();
|
||||
if (!this.isStreaming && !this.processingFiles && (this.value.trim() || this.attachments.length > 0)) {
|
||||
|
||||
Reference in New Issue
Block a user