]> Untitled Git - lemmy-ui.git/commitdiff
fix: Disable save button if no text is entered
authorJay Sitter <jay@jaysitter.com>
Sat, 24 Jun 2023 03:43:49 +0000 (23:43 -0400)
committerJay Sitter <jay@jaysitter.com>
Sat, 24 Jun 2023 03:43:49 +0000 (23:43 -0400)
src/shared/components/common/markdown-textarea.tsx

index 97a26a742b195323f5351ee7bbe3ebac0996203f..ef932732ff6e2492193a433999b3eaa25a55e226 100644 (file)
@@ -309,7 +309,7 @@ export class MarkdownTextArea extends Component<
               <button
                 type="submit"
                 className="btn btn-sm btn-secondary ms-2"
-                disabled={this.isDisabled}
+                disabled={this.isDisabled || !this.state.content}
               >
                 {this.state.loading && <Spinner className="me-1" />}
                 {this.props.buttonTitle}