<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>18946</bug_id>
          
          <creation_ts>2012-09-21 07:13:09 +0000</creation_ts>
          <short_desc>&quot;whenever&quot; is not clear enough for implementation</short_desc>
          <delta_ts>2012-12-02 00:46:50 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#the-select-element</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>sof</cc>
    
    <cc>zcorpan</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>74178</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-09-21 07:13:09 +0000</bug_when>
    <thetext>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:
&quot;whenever&quot; 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74180</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2012-09-21 07:20:18 +0000</bug_when>
    <thetext>[[
If the multiple attribute is absent and the element&apos;s display size is 1, then whenever there are no option elements in the select element&apos;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 &quot;whenever&quot;.

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 &quot;whenever&quot; 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 &quot;whenever&quot; when adding or removing an option.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79240</commentid>
    <comment_count>2</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-12-02 00:46:50 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r7559.
Check-in comment: Try to clean up &lt;option&gt; element selectedness handling.
http://html5.org/tools/web-apps-tracker?from=7558&amp;to=7559</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>