From 3c8ed85ac84a0f6c3647f900418c57e1938384d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=85=B4=E9=9A=86?= <81056572+717986230@users.noreply.github.com> Date: Fri, 1 May 2026 02:46:04 +0800 Subject: [PATCH 1/2] fix: prevent comment submit during IME composition --- apps/web/core/components/comments/comment-create.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/web/core/components/comments/comment-create.tsx b/apps/web/core/components/comments/comment-create.tsx index d230a5be93e..bfa8da9ab90 100644 --- a/apps/web/core/components/comments/comment-create.tsx +++ b/apps/web/core/components/comments/comment-create.tsx @@ -96,6 +96,7 @@ export const CommentCreate = observer(function CommentCreate(props: TCommentCrea onKeyDown={(e) => { if ( e.key === "Enter" && + !e.nativeEvent.isComposing && !e.shiftKey && !e.ctrlKey && !e.metaKey && @@ -122,7 +123,7 @@ export const CommentCreate = observer(function CommentCreate(props: TCommentCrea workspaceSlug={workspaceSlug} projectId={projectId} onEnterKeyPress={(e) => { - if (!isEmpty && !isSubmitting) { + if (!e.nativeEvent.isComposing && !isEmpty && !isSubmitting) { handleSubmit(onSubmit)(e); } }} From ae9ad24be8a71f0415c19458f34151900c1fb316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=85=B4=E9=9A=86?= <81056572+717986230@users.noreply.github.com> Date: Fri, 1 May 2026 02:46:23 +0800 Subject: [PATCH 2/2] fix: prevent comment edit submit during IME composition --- apps/web/core/components/comments/card/edit-form.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/web/core/components/comments/card/edit-form.tsx b/apps/web/core/components/comments/card/edit-form.tsx index 9be8b135521..26c32374c86 100644 --- a/apps/web/core/components/comments/card/edit-form.tsx +++ b/apps/web/core/components/comments/card/edit-form.tsx @@ -77,7 +77,8 @@ export const CommentCardEditForm = observer(function CommentCardEditForm(props:
{ - if (e.key === "Enter" && !e.shiftKey && !e.ctrlKey && !e.metaKey && !isEmpty) handleSubmit(onEnter)(e); + if (e.key === "Enter" && !e.nativeEvent.isComposing && !e.shiftKey && !e.ctrlKey && !e.metaKey && !isEmpty) + handleSubmit(onEnter)(e); }} > setValue("comment_html", comment_html)} onEnterKeyPress={(e) => { - if (!isEmpty && !isSubmitting) { + if (!e.nativeEvent.isComposing && !isEmpty && !isSubmitting) { handleSubmit(onEnter)(e); } }}