Consider the following HTML:
<form action="">
<input />
<select>
<option>A</option>
<option>B</option>
</select>
<input type="submit" />
</form>
If the focus is on the input
(text box) and I hit enter, the form submits.
But, if the focus is on the select
(dropdown box) and I hit enter, nothing happens.
I know I could figure out some JavaScript to override this, but I want to know why hitting enter doesn't just work?
Is there something I would break by capturing the enter with JavaScript (maybe some native keyboard accessibility of the dropdown)?