Skip to content

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

Open
dkordik wants to merge 1 commit intobitovi:masterfrom
dkordik:master
Open

Make enter key on a form input trigger click on first submit button#66
dkordik wants to merge 1 commit intobitovi:masterfrom
dkordik:master

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