<?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>27904</bug_id>
          
          <creation_ts>2015-01-27 11:08:57 +0000</creation_ts>
          <short_desc>normalize behavior of select options&apos; .defaultSelected, and add .defaultValue</short_desc>
          <delta_ts>2016-04-27 16:37:29 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>netmosfera</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>arronei</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>117502</commentid>
    <comment_count>0</comment_count>
    <who name="">netmosfera</who>
    <bug_when>2015-01-27 11:08:57 +0000</bug_when>
    <thetext>since select-one has no &quot;none-selected&quot; state

&lt;select&gt;
&lt;option&gt;foo&lt;/option&gt;
&lt;option&gt;bar&lt;/option&gt;
&lt;/select&gt;

selectelement.options[0].defaultSelected should return true even if the &quot;selected&quot; attribute on the first &lt;option&gt; wasn&apos;t declared explicitly 

basically, it should behave as writing:

&lt;select&gt;
&lt;option selected&gt;foo&lt;/option&gt;
&lt;option&gt;bar&lt;/option&gt;
&lt;/select&gt;

------------------


&lt;select&gt;
&lt;option selected&gt;foo&lt;/option&gt;
&lt;option selected&gt;bar&lt;/option&gt;
&lt;/select&gt;

selectelement.options[1].defaultSelected should return false, since it was declared in a &lt;select&gt;-one


------------------

additionally, since HTMLSelectElement has the &quot;value&quot; property, I&apos;d suggest to add &quot;defaultValue&quot; as well, for consistency:

&lt;select&gt;
    &lt;option selected&gt;foo&lt;/option&gt;
&lt;/select&gt;

console.log(selectElement.value); // &quot;foo&quot;
console.log(selectElement.defaultValue); // undefined, currently not implemented</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126203</commentid>
    <comment_count>1</comment_count>
    <who name="Arron Eicholz">arronei</who>
    <bug_when>2016-04-27 16:37:29 +0000</bug_when>
    <thetext>HTML5.1 Bugzilla Bug Triage: Incubation needed

This bug constitutes a request for a new feature of HTML. The current guidelines [1], rather than track such requests as bugs or issues, please create a proposal outlining the desired behavior, or at least a sketch of what is wanted (much of which is probably contained in this bug), and start the discussion/proposal in the WICG [2]. As your idea gains interest and momentum, it may be brought back into HTML through the Intent to Migrate process [3].
[1] https://github.com/w3c/html#contributing-to-this-repository
[2] https://www.w3.org/community/wicg/
[3] https://wicg.github.io/admin/intent-to-migrate.html</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>