Open Bug 489197 Opened 12 years ago Updated 3 years ago

elementFromPoint returning HTML instead of BODY element


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

Windows XP





(Reporter: jarbon, Unassigned)




User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/ Safari/525.19
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: 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:
<title>Should show 'BODY', not 'HTML'.</title>
<body onload="alert(document.elementFromPoint(10,10).tagName);" width="100" height="100">


Reproducible: Always

Steps to Reproduce:

Actual Results:  
HTML element is found

Expected Results:  
BODY element is found
Component: General → DOM: Core & HTML
Product: Firefox → Core
QA Contact: general → general

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.