diff --git a/app/javascript/mastodon/features/compose/components/compose_form.jsx b/app/javascript/mastodon/features/compose/components/compose_form.jsx index b5e8dabb7b3..726b3885c1f 100644 --- a/app/javascript/mastodon/features/compose/components/compose_form.jsx +++ b/app/javascript/mastodon/features/compose/components/compose_form.jsx @@ -101,9 +101,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) => {