RESOLVED CONFIGURATION CHANGED 67199
In specific cases, document.elementFromPoint returns wrong element
https://bugs.webkit.org/show_bug.cgi?id=67199
Summary In specific cases, document.elementFromPoint returns wrong element
Vincent Bernardi
Reported 2011-08-30 07:14:36 PDT
Created attachment 105622 [details] HTML source of the page which doesn't add/remove a style element. <http://test.elvanor.net/js/webkit/element_from_point_works.html> (A) <http://test.elvanor.net/js/webkit/element_from_point.html> (B) In the above pages, I have a div and a hidden span inside. There's an inline script on both pages which logs what element was clicked using document.elementFromPoint. The script on the second page (B) also creates a style element, adds it to <head> and removes it instantly. I believe the expected logged element (on both pages) when clicking the div is <div>, since the span is hidden. Expected: (A): Div (B): Div Here's what is logged when clicking on each page: Chromium 13.0.782.215 (Linux) : (A): Div (B): Span Safari 5.1 (7534.48.3) (Mac OS X 10.7) : (A): Div (B): Span Safari nightly 5.1 (7534.48.3, r94061) (Mac OS X 10.7) : (A): Span (B): Span Google Chrome 13.0.782.215 (Mac): (A): Div (B): Span
Attachments
HTML source of the page which doesn't add/remove a style element. (63 bytes, text/plain)
2011-08-30 07:14 PDT, Vincent Bernardi
no flags
HTML source of the page which does add/remove a style element. (57 bytes, text/plain)
2011-08-30 07:15 PDT, Vincent Bernardi
no flags
Vincent Bernardi
Comment 1 2011-08-30 07:15:05 PDT
Created attachment 105623 [details] HTML source of the page which does add/remove a style element.
Vincent Bernardi
Comment 2 2011-08-30 07:15:51 PDT
Sorry I attached the URLs when I meant to attach the source.
Vincent Bernardi
Comment 3 2012-06-29 02:21:00 PDT
Safari 5.1.7 (7534.57.2) (Mac OS X 10.7) : (A): Span (B): Span
Vincent Bernardi
Comment 4 2012-09-07 05:52:23 PDT
Safari 6.0 (8536.25) (Mac OS X 10.8) : (A): Div (B): Span
Vincent Bernardi
Comment 5 2013-06-11 06:28:17 PDT
Safari 6.0.4 (8536.29.13) (Mac OS X 10.8.3) : (A): Span (B): Span
Vincent Bernardi
Comment 6 2013-11-04 00:45:44 PST
Safari 7.0 (9537.71) (Mac OS X 10.9) : (A): Span (B): Span
Vincent Bernardi
Comment 7 2013-11-04 00:48:30 PST
Google Chrome 30.0.1599.101 (Mac): (A): Div (B): Div Bug is now fixed on Chrome and not on Safari.
Vincent Bernardi
Comment 8 2014-06-08 02:04:04 PDT
Safari 7.0.4 (9537.76.4) (Mac OS X 10.9.3) : (A): Div (B): Span ...and we're back gain to Safari 5.1's behavior :-)
Vincent Bernardi
Comment 9 2015-09-15 08:13:26 PDT
Safari 8.0.7 (10600.7.12) (Mac OS X 10.10.4) : (A): Div (B): Div Seems the bug is solved for now. What a nice 4 years ride.
Vincent Bernardi
Comment 10 2018-05-28 07:07:19 PDT
Safari 11.1 (13605.1.33.1.4) (Mac OS X 10.13.4 (17E202)) : (A): Div (B): Div My watch has ended.
Ahmad Saleem
Comment 11 2022-12-07 14:22:49 PST
User confirmed in Comment 10 that this is fixed. Marking this as "RESOLVED CONFIGURATION CHANGED". Thanks!
Note You need to log in before you can comment on or make changes to this bug.