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(number-input): prevent form submission #1748

Conversation

StephenHogsten
Copy link
Contributor

add type='button' to all number-input controls
prevents forms containing number-input elements
from being submitted prematurely

Closes #1747
Clicking controls on number inputs within forms causes the form to be submitted

Changelog

Changed

  • src/components/number-input/number-input.hbs

Testing / Reviewing

  • to see the change: wrap the entire hbs file in a . Observe that nothing is submitted when interacting with the number inputs
  • ran gulp tests and a11y checks. Nothing appeared relevant to these changes.
  • Should be noted that while this is fixed in carbon-components-react, it seems like the vue and angular components were based off the vanilla example and probably still have the issue

add type='button' to all number-input controls
prevent forms containing number-input elements
from being submitted prematurely

closes carbon-design-system#1747
@netlify
Copy link

netlify bot commented Feb 8, 2019

Deploy preview for the-carbon-components ready!

Built with commit 6f9aab2

https://deploy-preview-1748--the-carbon-components.netlify.com

Copy link
Contributor

@asudoh asudoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 - Thanks @StephenHogsten for jumping in!

@asudoh asudoh merged commit 17c3b3d into carbon-design-system:master Feb 8, 2019
@carbon-bot
Copy link
Contributor

🎉 This PR is included in version 9.73.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

Buttons on Number Input shouldn't submit forms
4 participants