]> Untitled Git - lemmy-ui.git/commitdiff
fix: Add type=button to buttons
authorJay Sitter <jay@jaysitter.com>
Sun, 25 Jun 2023 05:40:03 +0000 (01:40 -0400)
committerJay Sitter <jay@jaysitter.com>
Sun, 25 Jun 2023 05:40:21 +0000 (01:40 -0400)
src/shared/components/common/vote-buttons.tsx

index f6113c478b620121b9f860ce74259d31528e6b31..09799188db515bf4945b101bfd0ce517be6dfb94 100644 (file)
@@ -106,6 +106,7 @@ export class VoteButtonsCompact extends Component<
     return (
       <div>
         <button
+          type="button"
           className={`btn-animate btn py-0 px-1 ${
             this.props.my_vote === 1 ? "text-info" : "text-muted"
           }`}
@@ -129,6 +130,7 @@ export class VoteButtonsCompact extends Component<
         </button>
         {this.props.enableDownvotes && (
           <button
+            type="button"
             className={`ms-2 btn-animate btn py-0 px-1 ${
               this.props.my_vote === -1 ? "text-danger" : "text-muted"
             }`}
@@ -174,6 +176,7 @@ export class VoteButtons extends Component<VoteButtonsProps, VoteButtonsState> {
     return (
       <div className={`vote-bar col-1 pe-0 small text-center`}>
         <button
+          type="button"
           className={`btn-animate btn btn-link p-0 ${
             this.props.my_vote == 1 ? "text-info" : "text-muted"
           }`}
@@ -200,6 +203,7 @@ export class VoteButtons extends Component<VoteButtonsProps, VoteButtonsState> {
         )}
         {this.props.enableDownvotes && (
           <button
+            type="button"
             className={`btn-animate btn btn-link p-0 ${
               this.props.my_vote == -1 ? "text-danger" : "text-muted"
             }`}