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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>153887</bug_id>
          
          <creation_ts>2016-02-04 12:55:13 -0800</creation_ts>
          <short_desc>iOS &quot;clickable elements&quot; concept/restriction not compatible with UI Events spec</short_desc>
          <delta_ts>2023-07-15 11:26:20 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 10</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc>http://wpt.live/uievents/order-of-events/mouse-events/click-on-div.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction, W3CTest</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Chris Rebert">webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>annevk</cc>
    
    <cc>baba</cc>
    
    <cc>benedek.kaldi</cc>
    
    <cc>doochik</cc>
    
    <cc>karlcow</cc>
    
    <cc>kevincox</cc>
    
    <cc>rniwa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1162130</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Rebert">webkit</who>
    <bug_when>2016-02-04 12:55:13 -0800</bug_when>
    <thetext>I presume there must be some existing &quot;Why isn&apos;t my &lt;div&gt; clickable?&quot; bug of which this will be a duplicate,
but my search-fu wasn&apos;t able to turn up anything and there&apos;s now an actual web-platform-test for this, so...

https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html states
that elements only fire `click` events in certain circumstances (e.g. is a &lt;button&gt;, has an `onclick`, is styled as `cursor: pointer;`, etc.).
However, the W3C spec that defines the `click` event doesn&apos;t place any such special preconditions on which elements fire `click` events.

Quoting from relevant portions of the spec:

https://www.w3.org/TR/uievents/#event-type-click
&gt; The click event type must be dispatched on the topmost event target indicated by the pointer,
&gt; when the user presses down and releases the primary pointer button,
&gt; or otherwise activates the pointer in a manner that simulates such an action.

https://www.w3.org/TR/uievents/#glossary-topmost-event-target
&gt; topmost event target
&gt;     The *topmost event target* must be the element highest in the rendering order which is capable of being an event target.
&gt;     In graphical user interfaces this is the element under the user&apos;s pointing device. [...]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1162131</commentid>
    <comment_count>1</comment_count>
    <who name="Chris Rebert">webkit</who>
    <bug_when>2016-02-04 12:56:49 -0800</bug_when>
    <thetext>Set the URL field to the relevant web-platform-test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1503298</commentid>
    <comment_count>2</comment_count>
    <who name="Lucas Forschler">lforschler</who>
    <bug_when>2019-02-06 09:19:02 -0800</bug_when>
    <thetext>Mass move bugs into the DOM component.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1966582</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-07-13 04:47:43 -0700</bug_when>
    <thetext>Safari 16.5.1 also passes this test: https://wpt.fyi/results/uievents/order-of-events/mouse-events/click-on-div.html?label=master&amp;label=experimental&amp;aligned&amp;q=mouse-events%2Fclick-on-div.html

From linked in URL Field.

can we mark this as “RESOLVED CONFIGURATION CHANGED”?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1966904</commentid>
    <comment_count>4</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2023-07-15 11:26:20 -0700</bug_when>
    <thetext>Yes!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>