<?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>146033</bug_id>
          
          <creation_ts>2015-06-16 16:00:31 -0700</creation_ts>
          <short_desc>Click events nested within click event handlers do not trigger the first time</short_desc>
          <delta_ts>2019-02-06 09:18:47 -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>525.x (Safari 3.2)</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 8.2</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Chris Henderson">cwhenderson20</reporter>
          <assigned_to name="Chris Dumez">cdumez</assigned_to>
          <cc>benjamin</cc>
    
    <cc>cdumez</cc>
    
    <cc>dbates</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1102373</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Henderson">cwhenderson20</who>
    <bug_when>2015-06-16 16:00:31 -0700</bug_when>
    <thetext>In mobile Safari, click events within click handlers do not trigger on the first click.

Example code:
-------------
document.querySelector(&apos;.link-one&apos;).addEventListener(&apos;click&apos;, function () {
    document.querySelector(&apos;.link-two&apos;).click();
});

In Chrome (mobile and desktop) as well as in desktop Safari (8.0.6), clicking a link with a class of &quot;link-one&quot; will then trigger the programmatic click of a link with class &quot;link-two&quot;. Mobile Safari, however, does not trigger the click until the &quot;.link-one&quot; element is clicked a second time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1104672</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2015-06-25 10:11:18 -0700</bug_when>
    <thetext>&lt;rdar://problem/21547470&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1115556</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2015-08-06 17:00:31 -0700</bug_when>
    <thetext>Tested on iOS 9 beta using:
http://jsfiddle.net/f0hdqww3/1/

I correctly see &quot;link2 clicked&quot; in the console after clicking link1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1503247</commentid>
    <comment_count>3</comment_count>
    <who name="Lucas Forschler">lforschler</who>
    <bug_when>2019-02-06 09:18:47 -0800</bug_when>
    <thetext>Mass move bugs into the DOM component.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>