mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Merge pull request #745 from ThibG/glitch-soc/fixes/grey-out-button
Disable the “TOOT” button (and secondary toot button) if the toot text is empty
This commit is contained in:
commit
5b43d7bcbf
@ -242,7 +242,7 @@ const handlers = {
|
||||
}
|
||||
|
||||
// Submit disabled:
|
||||
if (isSubmitting || isUploading || (!!text.length && !text.trim().length && !anyMedia)) {
|
||||
if (isSubmitting || isUploading || (!text.trim().length && !anyMedia)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -415,7 +415,7 @@ class Composer extends React.Component {
|
||||
spoilersAlwaysOn,
|
||||
} = this.props;
|
||||
|
||||
let disabledButton = isSubmitting || isUploading || (!!text.length && !text.trim().length && !anyMedia);
|
||||
let disabledButton = isSubmitting || isUploading || (!text.trim().length && !anyMedia);
|
||||
|
||||
return (
|
||||
<div className='composer'>
|
||||
|
Loading…
Reference in New Issue
Block a user