<?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>29503</bug_id>
          
          <creation_ts>2016-02-24 22:04:13 +0000</creation_ts>
          <short_desc>Element Click should specify how to handle multi selects</short_desc>
          <delta_ts>2016-09-20 20:28:08 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Browser Test/Tools WG</product>
          <component>WebDriver</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>20860</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="clmartin@microsoft.com">clmartin</reporter>
          <assigned_to name="Browser Testing and Tools WG">public-browser-tools-testing</assigned_to>
          <cc>johnjan</cc>
    
    <cc>mike</cc>
    
    <cc>simon.m.stewart</cc>
          
          <qa_contact name="Browser Testing and Tools WG">public-browser-tools-testing</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>125252</commentid>
    <comment_count>0</comment_count>
    <who name="clmartin@microsoft.com">clmartin</who>
    <bug_when>2016-02-24 22:04:13 +0000</bug_when>
    <thetext>Currently the spec doesn&apos;t specify how Click() should work on a multi-select option. In Chrome and Firefox, they perform a toggle instead of a click command. This means the option that has been &quot;clicked&quot; actually just toggles that option on/off. In Edge an actual click happens, which in a multi-select means the same element is clicked and the selection is never cleared.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127418</commentid>
    <comment_count>1</comment_count>
    <who name="John Jansen">johnjan</who>
    <bug_when>2016-09-19 16:40:39 +0000</bug_when>
    <thetext>note: dom event discussion with select lists as well...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127419</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Stewart">simon.m.stewart</who>
    <bug_when>2016-09-19 16:41:14 +0000</bug_when>
    <thetext>Chrome and Firefox are doing the Right Thing, IMO. &quot;Click&quot; is a &quot;do what I mean&quot; API.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127454</commentid>
    <comment_count>3</comment_count>
    <who name="clmartin@microsoft.com">clmartin</who>
    <bug_when>2016-09-20 20:28:08 +0000</bug_when>
    <thetext>I&apos;m curious why Chrome/Firefox&apos;s implementation is thought to be the right thing? A user cannot reproduce what Chrome/Firefox do in this case. If a user clicks an item in a multi-select it selects that item. If they click it again it doesn&apos;t deselect that item. If the goal is to be true to what a browser/user would actually do/see when clicking a mouse on a multi-select then Firefox/Chrome wouldn&apos;t actually be doing what&apos;s right.

Here is a jsfiddle example:
https://jsfiddle.net/oxen65bj/

Click once: Selects that option
Click same option 2nd time: Selects that option
Ctrl + Click same option: Deselects that option
Ctrl + Click other options: Selects those options in addition to the original option
Shift + Click: Select a range from the currently selected option to the clicked option

The appropriate way to deselect an option is to hold Ctrl and then Click the option you had selected. I would argue that this should be the approach. It would also offer other ways for users to do selections (seen above using Ctrl/Shift to select multiple).

If one of the goals is to have WebDriver truly implemented as how the browser would do a click or send a key and fire events and such, I&apos;d argue this is the route we should take. Otherwise we have a one-off functionality for clicking when it&apos;s a multi-select that doesn&apos;t actually do a click but instead some magic behind the scenes.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>