[WEB-496] improvement: disable submit on enter when there is no text in comment box.

This commit is contained in:
Prateek Shourya 2024-02-25 10:49:24 +05:30
parent 812df59d1d
commit 5f2350e0fc

View File

@ -82,7 +82,7 @@ export const IssueCommentCreate: FC<TIssueCommentCreate> = (props) => {
render={({ field: { value, onChange } }) => (
<LiteTextEditorWithRef
onEnterKeyPress={(e) => {
handleSubmit(onSubmit)(e);
!(watch("comment_html") === "") && handleSubmit(onSubmit)(e);
}}
cancelUploadImage={fileService.cancelUpload}
uploadFile={fileService.getUploadFileFunction(workspaceSlug as string)}