diff options
author | Michael Murray <mmurray.wa@gmail.com> | 2011-03-24 19:02:38 -0400 |
---|---|---|
committer | jeresig <jeresig@gmail.com> | 2011-03-24 19:02:38 -0400 |
commit | e8f4629b924cae0b0f1847d2368031f06bc08149 (patch) | |
tree | 5dfa8f5767bf578018311f05ddcfe1cb29f5f8a0 /src/offset.js | |
parent | 1912ded3ee0065a71ee0d16c1e5aaba0daef82a0 (diff) | |
download | jquery-e8f4629b924cae0b0f1847d2368031f06bc08149.tar.gz jquery-e8f4629b924cae0b0f1847d2368031f06bc08149.zip |
Offset setter for fixed position elements in Webkit. Fixes #8316.
Diffstat (limited to 'src/offset.js')
-rw-r--r-- | src/offset.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/offset.js b/src/offset.js index 1003c400c..18261bb57 100644 --- a/src/offset.js +++ b/src/offset.js @@ -181,10 +181,10 @@ jQuery.offset = { curOffset = curElem.offset(), curCSSTop = jQuery.css( elem, "top" ), curCSSLeft = jQuery.css( elem, "left" ), - calculatePosition = (position === "absolute" && jQuery.inArray('auto', [curCSSTop, curCSSLeft]) > -1), + calculatePosition = ((position === "absolute" || position === "fixed") && jQuery.inArray('auto', [curCSSTop, curCSSLeft]) > -1), props = {}, curPosition = {}, curTop, curLeft; - // need to be able to calculate position if either top or left is auto and position is absolute + // need to be able to calculate position if either top or left is auto and position is either absolute or fixed if ( calculatePosition ) { curPosition = curElem.position(); } |