I have two <button> elements in one form.
First <button> have a click handler, which removes the form.
Second <button> have click handler which submits the form.
Everything is fine, until i press enter inside any input field in the form. It’s triggering first <button> and removes the form instead of submitting it.
Is it possible to fix it somehow?
Thanks 😉
Setting the button which submits the form to
<button type="submit">and the other to<button type="button">should do the trickLive demo: http://jsfiddle.net/pgamE/3/