Bug 146033

Summary: Click events nested within click event handlers do not trigger the first time
Product: WebKit Reporter: Chris Henderson <cwhenderson20>
Component: DOMAssignee: Chris Dumez <cdumez>
Status: RESOLVED WORKSFORME    
Severity: Normal CC: benjamin, cdumez, dbates, eric.carlson, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 525.x (Safari 3.2)   
Hardware: iPhone / iPad   
OS: iOS 8.2   

Description Chris Henderson 2015-06-16 16:00:31 PDT
In mobile Safari, click events within click handlers do not trigger on the first click.

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

In Chrome (mobile and desktop) as well as in desktop Safari (8.0.6), clicking a link with a class of "link-one" will then trigger the programmatic click of a link with class "link-two". Mobile Safari, however, does not trigger the click until the ".link-one" element is clicked a second time.
Comment 1 Radar WebKit Bug Importer 2015-06-25 10:11:18 PDT
<rdar://problem/21547470>
Comment 2 Chris Dumez 2015-08-06 17:00:31 PDT
Tested on iOS 9 beta using:
http://jsfiddle.net/f0hdqww3/1/

I correctly see "link2 clicked" in the console after clicking link1.
Comment 3 Lucas Forschler 2019-02-06 09:18:47 PST
Mass move bugs into the DOM component.