Skip to content
Permalink
Browse files

Adjust fallback top/left to just be 0 for disconnected DOM nodes. Fol…

…low-up to cf672a2, thanks to @jitter for the catch.
  • Loading branch information
jeresig committed Sep 29, 2010
1 parent 49f6f34 commit ec7ea3fba15379ebe8ddff5f6c99ec3faf8d6d17
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/offset.js
@@ -25,7 +25,7 @@ if ( "getBoundingClientRect" in document.documentElement ) {
box = elem.getBoundingClientRect();

} catch(e) {
box = { top: elem.offsetTop, left: elem.offsetLeft };
box = { top: 0, left: 0 };
}

var doc = elem.ownerDocument,

0 comments on commit ec7ea3f

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