Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Make enter key on a form input trigger click on first submit button #66
When you press enter on an input inside of a form, the browser fires a submit event on the form, and also fires a click event on the first submit button of the form, if there is one. elements default to type "submit" if a type is not specified.
This behavior is illustrated in this jsfiddle: http://jsfiddle.net/dkordik/y25r4qnp/