π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
TypeScript boardsbug-trackerdjangodockerganttissue-trackerjirajira-alternativekanbanlinearpostgresqlproduct-managementproject-managementproject-planningpythonreactredistypesciptvitework-management
fix: issue comment validation (#4211)
Anmol Singh Bhatia59772be014b3
diff --git a/web/components/issues/issue-detail/issue-activity/comments/comment-create.tsx b/web/components/issues/issue-detail/issue-activity/comments/comment-create.tsxindex 6261e693ab..0263a37e10 100644--- a/web/components/issues/issue-detail/issue-activity/comments/comment-create.tsx+++ b/web/components/issues/issue-detail/issue-activity/comments/comment-create.tsx@@ -50,7 +50,11 @@ export const IssueCommentCreate: FC<TIssueCommentCreate> = (props) => {});const commentHTML = watch("comment_html");- const isEmpty = commentHTML?.trim() === "" || commentHTML === "<p></p>" || isEmptyHtmlString(commentHTML ?? "");++ const isEmpty =+ commentHTML?.trim() === "" ||+ commentHTML === "<p></p>" ||+ (isEmptyHtmlString(commentHTML ?? "") && !commentHTML?.includes("mention-component"));return (<div@@ -70,7 +74,9 @@ export const IssueCommentCreate: FC<TIssueCommentCreate> = (props) => {workspaceId={workspaceId}projectId={projectId}workspaceSlug={workspaceSlug}- onEnterKeyPress={(e) => handleSubmit(onSubmit)(e)}+ onEnterKeyPress={(e) => {+ if (!isEmpty && !isSubmitting) handleSubmit(onSubmit)(e);+ }}ref={editorRef}initialValue={value ?? "<p></p>"}containerClassName="min-h-[35px]"