According to the documentation (knockoutjs.com/documentation/submit-binding.html) the submit binding of knockoutjs has the advantage that it captures alternative ways to submit the form, such as pressing the enter key while typing into a text box.
I have a grid on my form and some users are trying to use the enter key to go from one field to the next. Is there a way to avoid submitting the form when this happens?
According to the documentation (knockoutjs.com/documentation/submit-binding.html) the submit binding of knockoutjs has the advantage that
Share
One choice is to add a
keypresshandler on the form as well that absorbs the enter key. It would look like:
js:
Sample here: http://jsfiddle.net/rniemeyer/FvZXj/2/