This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html Multipage: http://www.whatwg.org/C#the-select-element Complete: http://www.whatwg.org/c#the-select-element Comment: "whenever" is not clear enough for implementation Posted from: 81.231.170.159 by simonp@opera.com User agent: Opera/9.80 (Macintosh; Intel Mac OS X 10.7.4; U; en) Presto/2.10.289 Version/12.02
[[ If the multiple attribute is absent and the element's display size is 1, then whenever there are no option elements in the select element's list of options that have their selectedness set to true, the user agent must set the selectedness of the first option element in the list of options in tree order that is not disabled, if any, to true. ]] This should be explicitly invoked at certain times rather than saying "whenever". For instance, when setting value: [[ On setting, the value attribute must set the selectedness of all the option elements in the list of options to false, ]] should the "whenever" requirement apply at this point? [[ and then the first option element in the list of options, in tree order, whose value is equal to the given new value, if any, must have its selectedness set to true. ]] should it after this? Similarly with setting selectedIndex. What Opera has implemented now is that we allow a select to have no selected options if setting value or selectedIndex would end up not selecting anything, which I think is compatible with Firefox. We apply the "whenever" when adding or removing an option.
Checked in as WHATWG revision r7559. Check-in comment: Try to clean up <option> element selectedness handling. http://html5.org/tools/web-apps-tracker?from=7558&to=7559