Open
Bug 908233
Opened 11 years ago
Updated 2 years ago
document.elementFromPoint does not behave as expected
Categories
(Core :: DOM: Core & HTML, defect, P5)
Tracking
()
UNCONFIRMED
People
(Reporter: carl.allain, Unassigned)
Details
Attachments
(1 file)
416 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0 (Beta/Release) Build ID: 20130511120803 Steps to reproduce: Use the sample html file provided by opening it in a browser tab. Reduce the browser window and scroll so the only thing you see is the body text 'Allo'. Click on the body text 'Allo'. Actual results: Two alert windows will be shown. The second one is the one that is interesting as it gives us the name of the Element which Mozilla thinks we clicked on. It shows HTMLHeadingElement instead of HTMLBodyElement. Expected results: The second alert should have shown HTMLBodyElement as with IE and Chrome.
Reporter | ||
Comment 1•11 years ago
|
||
And for some reason Firefox scrolls to show the heading when we click on the body text while other browsers leave the document as it was shown.
Attachment #794069 -
Attachment mime type: text/plain → text/html
I think it's because the browser window get resized when the first alert is displayed. So by the time document.elementFromPoint is called, the position of the click is actually over the h1 element. Note that you get the expected result if you comment out the first alert.
Comment 3•11 years ago
|
||
Comment 2 sounds correct to me, and the bug is invalid as far as I can tell...
Comment 4•6 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
Assignee | ||
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•