Skip to content

Trigger submit event when pressing enter on form field#14

Open
ragulka wants to merge 2 commits into
j-ulrich:masterfrom
ragulka:master
Open

Trigger submit event when pressing enter on form field#14
ragulka wants to merge 2 commits into
j-ulrich:masterfrom
ragulka:master

Conversation

@ragulka

@ragulka ragulka commented Dec 2, 2013

Copy link
Copy Markdown
Contributor

Closes #13

I realized that triggering the submit event is the way to go instead of trying to call submit() on the form itself. The latter would result in submitting the form but no way to catch the event, because it triggered no events.

It also takes into account when even.preventDefault() is called on the keydown event to prevent submit from happening.

@ghost ghost assigned j-ulrich Dec 2, 2013
@j-ulrich j-ulrich removed this from the 1.3.0 milestone Mar 6, 2014
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.

key-sequence: trigger submit when pressing enter inside a form field

2 participants