]> source.dussan.org Git - jquery.git/commitdiff
Adjust fallback top/left to just be 0 for disconnected DOM nodes. Follow-up to cf672a...
authorJohn Resig <jeresig@gmail.com>
Wed, 29 Sep 2010 12:45:52 +0000 (05:45 -0700)
committerJohn Resig <jeresig@gmail.com>
Wed, 29 Sep 2010 12:45:52 +0000 (05:45 -0700)
src/offset.js

index 39763ee609690aabff5880d631726b6b2f399fce..7f654d8f2613d93a929c9aac45301dc4dfffad23 100644 (file)
@@ -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,