querySelector() sporadically returns wrong element
Reported by
i...@elookon.de,
Jul 31 2017
|
||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36
Steps to reproduce the problem:
See below
What is the expected behavior?
What went wrong?
In the above example following event:
document.querySelector('#f' + fileID).addEventListener('click', function(e) {
console.log(e.target + ' ID:', e.target.id);
});
is added to following HTML code:
<li>
<span class="file name"></span> <span class="file size"></span>
<svg class="icon smaller ui cancel">
<use href="#ui-cross" />
</svg>
</li>
When clicking on the SVG element there sporadically there is the wrong element returned. Please have a look to the screenshot for instructions and the source code of the page.
You can test the bu here https://goo.gl/wLWgDp.
Login credentials:
Username: google
Password: dev
Did this work before? N/A
Chrome version: 60.0.3112.78 Channel: stable
OS Version: 10.0
Flash Version:
,
Jul 31 2017
I checked again, as 'e.currentTarget' always returns [object SVGSVGElement] it seems not to be a bug.
,
Jul 31 2017
Closing as per comment #2. |
||
►
Sign in to add a comment |
||
Comment 1 by i...@elookon.de
, Jul 31 201740.6 KB
40.6 KB View Download
44.2 KB
44.2 KB View Download