Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(web): require button type #9786

Merged
merged 1 commit into from
May 27, 2024
Merged

Conversation

michelheusschen
Copy link
Contributor

The <button> element has a default of type="submit" rather than the often assumed type="button". This becomes an issue when the button is inside a form element and starts submitting the form. To prevent this, an eslint rule is added to require a type attribute for buttons.

Changes:

  • Add type="button" when type is missing
  • Remove nested buttons and links (invalid html)
  • Use <a href=""> for links instead of a button

Fixes #9782 where the issue only happens when "Reset to default" is visible

@alextran1502 alextran1502 merged commit 38f4a02 into main May 27, 2024
25 checks passed
@alextran1502 alextran1502 deleted the fix/web-require-button-type branch May 27, 2024 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pressing Enter on Job Settings fields sets the values back to default
2 participants