X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=blobdiff_plain;f=src%2Foffset.js;h=a10d30a0fefb1a4d6c8ffeba99c1104aba2b69cb;hp=2040c9d83ac9d5db4f15159cc980fbab5c2506fd;hb=c1d719b580ea78c33961113030d7fa25bcc98e6f;hpb=3d0aa196c5420e7f68b32cee38f0cc740d4959c6 diff --git a/src/offset.js b/src/offset.js index 2040c9d..a10d30a 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,