Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/web/core/components/comments/card/edit-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import type { TCommentsOperations, TIssueComment } from "@plane/types";
import { cn, isCommentEmpty } from "@plane/utils";
// components
import { LiteTextEditor } from "@/components/editor/lite-text";
import { isComposingKeyboardEvent } from "@/helpers/keyboard";

type Props = {
activityOperations: TCommentsOperations;
Expand Down Expand Up @@ -77,6 +78,8 @@ export const CommentCardEditForm = observer(function CommentCardEditForm(props:
<form className="flex flex-col gap-2">
<div
onKeyDown={(e) => {
if (isComposingKeyboardEvent(e.nativeEvent)) return;

if (e.key === "Enter" && !e.shiftKey && !e.ctrlKey && !e.metaKey && !isEmpty) handleSubmit(onEnter)(e);
}}
>
Expand Down
3 changes: 3 additions & 0 deletions apps/web/core/components/comments/comment-create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import type { TIssueComment, TCommentsOperations } from "@plane/types";
import { cn, isCommentEmpty } from "@plane/utils";
// components
import { LiteTextEditor } from "@/components/editor/lite-text";
import { isComposingKeyboardEvent } from "@/helpers/keyboard";
// hooks
import { useWorkspace } from "@/hooks/store/use-workspace";
// services
Expand Down Expand Up @@ -94,6 +95,8 @@ export const CommentCreate = observer(function CommentCreate(props: TCommentCrea
<div
className={cn("sticky bottom-0 z-[4] bg-surface-1 sm:static")}
onKeyDown={(e) => {
if (isComposingKeyboardEvent(e.nativeEvent)) return;

if (
e.key === "Enter" &&
!e.shiftKey &&
Expand Down
2 changes: 2 additions & 0 deletions apps/web/core/helpers/keyboard.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const isComposingKeyboardEvent = (event: Pick<KeyboardEvent, "isComposing" | "keyCode">) =>
event.isComposing || event.keyCode === 229;
Comment on lines +1 to +2
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new helper file is missing the standard copyright/SPDX header that appears at the top of other source files in this repo (e.g. apps/web/core/components/comments/comment-create.tsx:1-5). Please add the same header block here for consistency and licensing compliance.

Copilot uses AI. Check for mistakes.
4 changes: 4 additions & 0 deletions packages/editor/src/core/extensions/enter-key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ export const EnterKeyExtension = (onEnterKeyPress?: () => void) =>
addKeyboardShortcuts(this) {
return {
Enter: () => {
if (this.editor.view.composing) {
return false;
}

const { activeDropbarExtensions } = this.editor.storage.utility;

if (activeDropbarExtensions.length === 0) {
Expand Down