diff --git a/app/javascript/flavours/glitch/features/composer/index.js b/app/javascript/flavours/glitch/features/composer/index.js index 792ed79a311..3aa283628ea 100644 --- a/app/javascript/flavours/glitch/features/composer/index.js +++ b/app/javascript/flavours/glitch/features/composer/index.js @@ -150,6 +150,9 @@ const handlers = { const { onChangeText, onSubmit, + isSubmitting, + isUploading, + anyMedia, text, } = this.props; @@ -159,6 +162,11 @@ const handlers = { onChangeText(value); } + // Submit disabled: + if (isSubmitting || isUploading || (!!text.length && !text.trim().length && !anyMedia)) { + return; + } + // Submits the status. if (onSubmit) { onSubmit();