Skip to content
Permalink
Browse files

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.
  • Loading branch information...
Russell Holbrook
Russell Holbrook committed Nov 22, 2010
1 parent 0838bdf commit 50170e618059d10132a5319c64660a631b095f44
Showing with 1 addition and 1 deletion.
  1. +1 −1 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,

0 comments on commit 50170e6

Please sign in to comment.
You can’t perform that action at this time.