jquery-simulate-ext
jquery-simulate-ext copied to clipboard
Trigger submit event when pressing enter on form field
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.