For some reason, if you have a button
in a form, and a text field
in a form
, pressing enter when the text field
has focus results in the button
being clicked.
Why does this happen, and how do I make it (the text field
) act in a more predictable manner (pressing enter in the text field
counts as a keyup
event)?