Fix #8482, offsetParent should not return null. Closes gh-847.

This commit is contained in:
Nowres Rafid
2012-07-06 09:58:34 -04:00
committed by Dave Methvin
parent 05aff40231
commit aaf134bb70
3 changed files with 8 additions and 2 deletions

View File

@@ -138,7 +138,7 @@ jQuery.fn.extend({
while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
offsetParent = offsetParent.offsetParent;
}
return offsetParent;
return offsetParent || document.body;
});
}
});