WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
146033
Click events nested within click event handlers do not trigger the first time
https://bugs.webkit.org/show_bug.cgi?id=146033
Summary
Click events nested within click event handlers do not trigger the first time
Chris Henderson
Reported
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.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2015-06-25 10:11:18 PDT
<
rdar://problem/21547470
>
Chris Dumez
Comment 2
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.
Lucas Forschler
Comment 3
2019-02-06 09:18:47 PST
Mass move bugs into the DOM component.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug