|
|
@ -74,6 +74,14 @@ export default class ComposeForm extends ImmutablePureComponent { |
|
|
|
this.props.onChange(this.autosuggestTextarea.textarea.value); |
|
|
|
} |
|
|
|
|
|
|
|
// Submit disabled:
|
|
|
|
const { is_submitting, is_uploading, anyMedia } = this.props; |
|
|
|
const fulltext = [this.props.spoiler_text, countableText(this.props.text)].join(''); |
|
|
|
|
|
|
|
if (is_submitting || is_uploading || length(fulltext) > 500 || (fulltext.length !== 0 && fulltext.trim().length === 0 && !anyMedia)) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
this.props.onSubmit(); |
|
|
|
} |
|
|
|
|
|
|
|