aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRussell Holbrook <russell.holbrook@patch.com>2010-11-22 18:26:46 -0500
committerRussell Holbrook <russell.holbrook@patch.com>2010-11-22 18:26:46 -0500
commit50170e618059d10132a5319c64660a631b095f44 (patch)
tree7fb072305c6b5eb80e70f4d40a9e48333c95ef40 /src
parent0838bdf52cf9f27ebc2bbee74fd7170e2d854c11 (diff)
downloadjquery-50170e618059d10132a5319c64660a631b095f44.tar.gz
jquery-50170e618059d10132a5319c64660a631b095f44.zip
jQuery.fn.offset no longer returns ClientRect object for disconnected elements
Instead of returning box, which is a ClientRect, we take the top and left box values and place them into a generic object.
Diffstat (limited to 'src')
-rw-r--r--src/offset.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/offset.js b/src/offset.js
index 3fb2917b2..dab053e00 100644
--- a/src/offset.js
+++ b/src/offset.js
@@ -30,7 +30,7 @@ if ( "getBoundingClientRect" in document.documentElement ) {
// Make sure we're not dealing with a disconnected DOM node
if ( !box || !jQuery.contains( docElem, elem ) ) {
- return box || { top: 0, left: 0 };
+ return box ? { top: box.top, left: box.left } : { top: 0, left: 0 };
}
var body = doc.body,