views:

159

answers:

1

This is an odd problem and likely a rookie mistake. For some odd reason, if I use the arrow keys to select a select option from below, it fails to submit unless I deselect by clicking somewhere else on the page. If I keep focus on the select option, the submission will fail to recognize the value. Am I committing some stupid mistake?

<select id="name" class="state">
    <option value="">
        Select
    </option>

    <option value="Alan">
        Alan
    </option>

    <option value="Brad">
        Brad
    </option>

    <option value="Carol">
        Carol
    </option>

    <option value="Derrick">
        Derrick
    </option>
</select>
+1  A: 

No. This is not a problem and is supposed to happen this way.

tr4656
Thank you. Is there a way for me to disable arrow or letter selection or force a selection?
bGood
It's best to leave browser behaviour alone for stuff like this, you risk messing up keyboard accessibility otherwise. However, normally the act of submitting a form requires that the user click a button, which will unfocus the select and cause the selection to be made. How is the form being submitted without unfocusing the select?
bobince
If I select an option by using arrows or letters, I can keep focus on the select. Clicking on the submit button doesn't unfocus the select button. Not a big deal but very annoying as some users may not recognize that they have to unfocus their selection first.
bGood