Rewrite IE logic.

This commit is contained in:
Andrew Dupont 2009-12-04 18:23:47 -06:00
parent 6ebfdd51d5
commit b56e7e754b
1 changed files with 2 additions and 1 deletions

View File

@ -870,7 +870,8 @@
// When the BODY is the offsetParent, IE6 mistakenly reports the
// parent as HTML. Use that as the litmus test to fix another
// annoying IE6 quirk.
if (parent.nodeName.toUpperCase() === 'HTML') {
if (element.offsetParent &&
element.offsetParent.nodeName.toUpperCase() === 'HTML') {
return positionedOffset(element);
}