diff --git a/app/javascript/mastodon/features/compose/components/compose_form.jsx b/app/javascript/mastodon/features/compose/components/compose_form.jsx index 9b4d3dfeb5e..b6d7519b363 100644 --- a/app/javascript/mastodon/features/compose/components/compose_form.jsx +++ b/app/javascript/mastodon/features/compose/components/compose_form.jsx @@ -104,9 +104,9 @@ class ComposeForm extends ImmutablePureComponent { canSubmit = () => { const { isSubmitting, isChangingUpload, isUploading, anyMedia, maxChars } = this.props; const fulltext = this.getFulltextForCharacterCounting(); - const isOnlyWhitespace = fulltext.length !== 0 && fulltext.trim().length === 0; + const hasNoTextContent = fulltext.trim().length === 0; - return !(isSubmitting || isUploading || isChangingUpload || length(fulltext) > maxChars || (isOnlyWhitespace && !anyMedia)); + return !(isSubmitting || isUploading || isChangingUpload || length(fulltext) > maxChars || (hasNoTextContent && !anyMedia)); }; handleSubmit = (e) => {