<?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>151933</bug_id>
          
          <creation_ts>2015-12-07 00:49:20 -0800</creation_ts>
          <short_desc>Tapping on &lt;body&gt; doesn&apos;t fire click events</short_desc>
          <delta_ts>2022-02-08 23:21:39 -0800</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>Safari 9</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 10</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://patrickhlauke.github.io/touch/tests/event-listener-body-clickable.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction, InRadar, W3CTest</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>159753</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Chris Rebert">webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>benjamin</cc>
    
    <cc>bfulgham</cc>
    
    <cc>redux</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1146776</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Rebert">webkit</who>
    <bug_when>2015-12-07 00:49:20 -0800</bug_when>
    <thetext>Testcases:
1. http://patrickhlauke.github.io/touch/tests/event-listener-body.html
2. http://patrickhlauke.github.io/touch/tests/event-listener-body-clickable.html

The 2nd testcase uses an `onclick=&quot;void(0)&quot;` attribute (per
https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html#//apple_ref/doc/uid/TP40006511-SW6
) and a `cursor:pointer` CSS style (per Internet lore)
to try to make the element (in our case, &lt;body&gt;) clickable in iOS Safari.

Steps to reproduce:
1. Open one of the testcases in Safari in iOS 9.1.
2. Tap the indicated blue area of the webpage.

Expected results:
In the gray event log box (located below the text &quot;Events (other than mousemove) targeted at the &lt;body&gt; element:&quot;),
there should be a line that says &quot;click&quot;,
indicating that a `click` event was fired at the &lt;body&gt; element as a result of the tap.
(There will be other lines for other events that were also fired, e.g. `touchstart`)

Actual results:
No `click` event is recorded in the gray log box,
indicating that no `click` event was fired at the &lt;body&gt; element as a result of the tap.

---

Additional info:
Per the specs, &lt;body&gt; isn&apos;t special-cased with regard to the `click` event, and should fire clicks just like any other element.

Android Chrome follows the expected behavior.
I strongly suspect IE/Edge Mobile also follows the expected behavior, but that&apos;s awaiting confirmation from a friend with a relevant device.

If changing the default behavior isn&apos;t feasible, then at a minimum I&apos;d hope for
there to be some way (similar to the `onclick=&quot;void(0)&quot; / `cursor:pointer` tricks) of requesting that &lt;body&gt; fire click events.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1156147</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2016-01-16 01:29:14 -0800</bug_when>
    <thetext>&lt;rdar://problem/24219436&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1156381</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Rebert">webkit</who>
    <bug_when>2016-01-18 04:49:59 -0800</bug_when>
    <thetext>Relevant W3C web-platform-test:
http://w3c-test.org/uievents/order-of-events/mouse-events/click-on-body-manual.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1385892</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2018-01-04 12:44:53 -0800</bug_when>
    <thetext>*** Bug 171105 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1385893</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2018-01-04 12:45:25 -0800</bug_when>
    <thetext>&lt;rdar://problem/5844416&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1503319</commentid>
    <comment_count>5</comment_count>
    <who name="Lucas Forschler">lforschler</who>
    <bug_when>2019-02-06 09:19:08 -0800</bug_when>
    <thetext>Mass move bugs into the DOM component.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1839030</commentid>
    <comment_count>6</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2022-02-08 23:21:39 -0800</bug_when>
    <thetext>Part of this was fixed here:

Committed r237658: &lt;https://trac.webkit.org/changeset/237658&gt;


And part here:
Committed r237978: &lt;https://trac.webkit.org/changeset/237978&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>