We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 569289b + 70cf26a commit a1dc52cCopy full SHA for a1dc52c
src/pages/home/report/ReportActionCompose.js
@@ -301,7 +301,7 @@ class ReportActionCompose extends React.Component {
301
updateComment(newComment) {
302
this.textInput.setNativeProps({text: newComment});
303
this.setState({
304
- isCommentEmpty: newComment.trim().length === 0,
+ isCommentEmpty: !!newComment.match(/^(\s|`)*$/),
305
});
306
307
// Indicate that draft has been created.
@@ -368,7 +368,7 @@ class ReportActionCompose extends React.Component {
368
const trimmedComment = this.comment.trim();
369
370
// Don't submit empty comments or comments that exceed the character limit
371
- if (!trimmedComment || trimmedComment.length > CONST.MAX_COMMENT_LENGTH) {
+ if (this.state.isCommentEmpty || trimmedComment.length > CONST.MAX_COMMENT_LENGTH) {
372
return;
373
}
374
0 commit comments