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

Make enter key on a form input trigger click on first submit button #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dkordik
Copy link

@dkordik dkordik commented Sep 19, 2014

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/

Closes #65

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. <button> elements default to type "submit" if a type is not specified.

This behavior is illustrated in this jsfiddle: http://jsfiddle.net/dkordik/y25r4qnp/

Closes bitovi#65
@justinbmeyer
Copy link
Member

Wow ... I was not aware of that. Good catch!

@nitish754
Copy link

really dont know that . thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Submitting a form should fire click on first submit button
3 participants