diff options
author | John Resig <jeresig@gmail.com> | 2010-09-29 05:45:52 -0700 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2010-09-29 05:45:52 -0700 |
commit | ec7ea3fba15379ebe8ddff5f6c99ec3faf8d6d17 (patch) | |
tree | 674bf96778701225f038c9c80271fef37b8f34e6 /src | |
parent | 49f6f341814dce07b9fe2eff0052feb5ef286dfd (diff) | |
download | jquery-ec7ea3fba15379ebe8ddff5f6c99ec3faf8d6d17.tar.gz jquery-ec7ea3fba15379ebe8ddff5f6c99ec3faf8d6d17.zip |
Adjust fallback top/left to just be 0 for disconnected DOM nodes. Follow-up to cf672a2e7a886cac5ae62f6772c6b4b43b19a2fc, thanks to @jitter for the catch.
Diffstat (limited to 'src')
-rw-r--r-- | src/offset.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/offset.js b/src/offset.js index 39763ee60..7f654d8f2 100644 --- a/src/offset.js +++ b/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, |