<?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>25112</bug_id>
          
          <creation_ts>2014-03-21 08:44:05 +0000</creation_ts>
          <short_desc>Since OptGroup is inside a select element. What should happen when OptGroup element is selected. Should the selected option be unselected.</short_desc>
          <delta_ts>2014-05-07 21:07:13 +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-optgroup-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>habib.virji</cc>
    
    <cc>ian</cc>
    
    <cc>krenair</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>102732</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-03-21 08:44:05 +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-optgroup-element
Complete: http://www.whatwg.org/c#the-optgroup-element
Referrer: 

Comment:
Since OptGroup is inside a select element. What should happen when OptGroup
element is selected. Should the selected option be unselected. 

Posted from: 82.43.26.66
User agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102733</commentid>
    <comment_count>1</comment_count>
    <who name="Habib Virji">habib.virji</who>
    <bug_when>2014-03-21 08:56:52 +0000</bug_when>
    <thetext>Bit more background to the issue: 

When OptGroup element is selected
1. IE and Chrome deselects the selected item
2. Firefox selects the first option. 

Issue raised in chrome: https://code.google.com/p/chromium/issues/detail?id=342189.

Optimum solution should be it is a label and no option selected should be changed, neither selectedItem should be changed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103235</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-04-01 16:48:24 +0000</bug_when>
    <thetext>What do you mean by &quot;selected&quot; here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103263</commentid>
    <comment_count>3</comment_count>
    <who name="Habib Virji">habib.virji</who>
    <bug_when>2014-04-02 09:00:01 +0000</bug_when>
    <thetext>Selected here means an item has been chosen by user using mouse or keyboard. 

In below code snippet:
&lt;select multiple&gt;&lt;optgroup label=&quot;unselectable label&quot;&gt;&lt;option&gt;selectable option&lt;/option&gt;&lt;/optgroup&gt;&lt;/select&gt;
1. User selects/choose *selectable option* 
2. Then he presses on optGroup label. 
--&gt; Currently clicking on optGroup deselects the selected/chosen item by the user in the chrome and IE.

So query is what the right approach, as spec does not say about it:
1. Keep current items selected as optGroup is just a label, a new behavior currently in no browser. 
2. Get all item unselected and reset selectedIndex as in IE and chrome
3. Deselect the current selection and select the first element as in Firefox</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103476</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-04-07 15:48:00 +0000</bug_when>
    <thetext>It should just be a label, clicking on it should do the same as clicking on the empty space in a four-item-high list box that only has two items, no?

I can try to clarify this...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103553</commentid>
    <comment_count>5</comment_count>
    <who name="Habib Virji">habib.virji</who>
    <bug_when>2014-04-08 08:16:53 +0000</bug_when>
    <thetext>(In reply to Ian &apos;Hixie&apos; Hickson from comment #4)
&gt; It should just be a label, clicking on it should do the same as clicking on
&gt; the empty space in a four-item-high list box that only has two items, no?
&gt; 
&gt; I can try to clarify this...

Agreed any clarification will ease things out.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105350</commentid>
    <comment_count>6</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-05-07 21:07:13 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r8611.
Check-in comment: Add some explanatory notes to &lt;optgroup&gt;
http://html5.org/tools/web-apps-tracker?from=8610&amp;to=8611</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>