New issue
Advanced search Search tips

Issue 750588 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jul 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

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:
 
returnerror.png
52.7 KB View Download

Comment 1 by i...@elookon.de, Jul 31 2017

It depends on where you click (see screenshot), maybe it is not a bug, I am not sure. Same behaviour on Mozilla Firefox.
clickdepen.png
40.6 KB View Download
firefox.png
44.2 KB View Download

Comment 2 by i...@elookon.de, Jul 31 2017

I checked again, as 'e.currentTarget' always returns [object SVGSVGElement] it seems not to be a bug.
Status: WontFix (was: Unconfirmed)
Closing as per comment #2.

Sign in to add a comment