From 5f2350e0fcdbdbf79215497031179ba5507bdc51 Mon Sep 17 00:00:00 2001 From: Prateek Shourya Date: Sun, 25 Feb 2024 10:49:24 +0530 Subject: [PATCH] [WEB-496] improvement: disable submit `on enter` when there is no text in comment box. --- .../issue-detail/issue-activity/comments/comment-create.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.tsx index f7bce3edc..571064e29 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 @@ -82,7 +82,7 @@ export const IssueCommentCreate: FC = (props) => { render={({ field: { value, onChange } }) => ( { - handleSubmit(onSubmit)(e); + !(watch("comment_html") === "") && handleSubmit(onSubmit)(e); }} cancelUploadImage={fileService.cancelUpload} uploadFile={fileService.getUploadFileFunction(workspaceSlug as string)}