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