momentum-mod / website

Momentum Mod's main website.
https://momentum-mod.org
MIT License
55 stars 60 forks source link

Prevent buttons from creating additional fields #950

Closed kanoka42 closed 1 month ago

kanoka42 commented 1 month ago

This PR addresses and fixes issue #948 by adding the type attribute to the buttons within the leaderboard component.

In Angular, if the button doesn't have a defined attribute type, then Angular may be trying to issue the keyup event and trigger the on click method for the button.

Closes #948

tsa96 commented 1 month ago

Yeah, that'll do it. angular-eslint has a rule for this, let's enable that and fix every other case. Going to do on top of your branch now as it only takes 5 minutes.

tsa96 commented 1 month ago

Wouldn't normally do this but want to get this PR in so I can create on directly on top. In the future, you should run

Avoiding commits like this is one of the benefits of rebase-based workflows in Git, if you refuse to ever rewrite history you inevitably end up with a commit history full of tiny formatting fixes and the like.