aboutsummaryrefslogtreecommitdiffstats
path: root/src/offset.js
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2015-05-05 08:33:50 -0700
committerTimmy Willison <timmywillisn@gmail.com>2015-05-05 08:53:17 -0700
commit0d11c1182f2012cd6eb06ce1e3fa5a495af9bee3 (patch)
tree82a78d6aa75943efdca5301d078190eb2635f772 /src/offset.js
parent6176567361e9d05d4f5eb7e98735a678f2cd7ea9 (diff)
downloadjquery-0d11c1182f2012cd6eb06ce1e3fa5a495af9bee3.tar.gz
jquery-0d11c1182f2012cd6eb06ce1e3fa5a495af9bee3.zip
Offset: allow offset setter to throw for disconnected elements
Fixes gh-2114
Diffstat (limited to 'src/offset.js')
-rw-r--r--src/offset.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/offset.js b/src/offset.js
index adcc8d64c..95658ca69 100644
--- a/src/offset.js
+++ b/src/offset.js
@@ -32,7 +32,7 @@ jQuery.offset = {
elem.style.position = "relative";
}
- curOffset = curElem.offset() || { top: 0, left: 0 };
+ curOffset = curElem.offset();
curCSSTop = jQuery.css( elem, "top" );
curCSSLeft = jQuery.css( elem, "left" );
calculatePosition = ( position === "absolute" || position === "fixed" ) &&