aboutsummaryrefslogtreecommitdiffstats
path: root/src/offset.js
diff options
context:
space:
mode:
authorNowres Rafid <nowres.rafed@gmail.com>2012-07-06 09:58:34 -0400
committerDave Methvin <dave.methvin@gmail.com>2012-07-06 10:01:32 -0400
commitaaf134bb7092efe7b450fc08ca5cc3c53cb00d76 (patch)
tree633a1527c42fd99a1d0bcd6ca683440371c0d940 /src/offset.js
parent05aff402310d7db5d15f96b15071af6aa21a2afc (diff)
downloadjquery-aaf134bb7092efe7b450fc08ca5cc3c53cb00d76.tar.gz
jquery-aaf134bb7092efe7b450fc08ca5cc3c53cb00d76.zip
Fix #8482, offsetParent should not return null. Closes gh-847.
Diffstat (limited to 'src/offset.js')
-rw-r--r--src/offset.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/offset.js b/src/offset.js
index fcd39ed05..f8fd0ec87 100644
--- a/src/offset.js
+++ b/src/offset.js
@@ -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;
});
}
});