Open Bug 489197 Opened 12 years ago Updated 3 years ago

elementFromPoint returning HTML instead of BODY element

Categories

(Core :: DOM: Core & HTML, defect, P5)

x86
Windows XP
defect

Tracking

()

UNCONFIRMED

People

(Reporter: jarbon, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.55 Safari/525.19
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8

elementFromPoint is returning the HTML element, when it should be returning the BODY element for points on the page where there is no other element.

Loading the repro html in IE, Chrome, Safari, all show 'BODY'.  FF shows 'HTML'.  Logically, 'BODY' is expected as it is lower in the DOM tree as well.

A fix would be much appreciated for browser compatibility.

The src for the repro url is:
<html>
<title>Should show 'BODY', not 'HTML'.</title>
<body onload="alert(document.elementFromPoint(10,10).tagName);" width="100" height="100">
</body>
</html>

cheers

Reproducible: Always

Steps to Reproduce:
1. http://jarbonpub.appspot.com/repro/chrome/elementFromPoint.html

Actual Results:  
HTML element is found

Expected Results:  
BODY element is found
Component: General → DOM: Core & HTML
Product: Firefox → Core
QA Contact: general → general
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
You need to log in before you can comment on or make changes to this bug.