diff --git a/web/core/components/issues/issue-detail/issue-activity/comments/comment-create.tsx b/web/core/components/issues/issue-detail/issue-activity/comments/comment-create.tsx index 35a7985cc7..6cd9b61430 100644 --- a/web/core/components/issues/issue-detail/issue-activity/comments/comment-create.tsx +++ b/web/core/components/issues/issue-detail/issue-activity/comments/comment-create.tsx @@ -18,7 +18,6 @@ const fileService = new FileService(); // editor import { TActivityOperations } from "../root"; - type TIssueCommentCreate = { projectId: string; workspaceSlug: string; @@ -82,7 +81,6 @@ export const IssueCommentCreate: FC = (props) => { const commentHTML = watch("comment_html"); const isEmpty = isCommentEmpty(commentHTML); - const isEditorReadyToDiscard = editorRef.current?.isEditorReadyToDiscard() return (
= (props) => { "-bottom-5": !peekIssue, })} onKeyDown={(e) => { - if (e.key === "Enter" && !e.shiftKey && !e.ctrlKey && !e.metaKey && !isEmpty && isEditorReadyToDiscard) + if (e.key === "Enter" && !e.shiftKey && !e.ctrlKey && !e.metaKey && !isEmpty && editorRef.current?.isEditorReadyToDiscard()) handleSubmit(onSubmit)(e); }} >