aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2015-06-15 10:56:29 -0400
committerTimmy Willison <timmywillisn@gmail.com>2015-06-16 10:54:52 -0400
commit578dcee96a8d4d759b3a7e623177fa36a5133ba7 (patch)
tree97aea71790c74468a622a1e53e4f7c7a8903df6f /src
parente831856490d2212bdbaff4cd76137b93ccf26d92 (diff)
downloadjquery-578dcee96a8d4d759b3a7e623177fa36a5133ba7.tar.gz
jquery-578dcee96a8d4d759b3a7e623177fa36a5133ba7.zip
Revert "Offset: allow offset setter to throw for disconnected elements"
This reverts commit 0d11c1182f2012cd6eb06ce1e3fa5a495af9bee3.
Diffstat (limited to 'src')
-rw-r--r--src/offset.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/offset.js b/src/offset.js
index 5ae7153f1..a6aa2f1d5 100644
--- a/src/offset.js
+++ b/src/offset.js
@@ -32,7 +32,7 @@ jQuery.offset = {
elem.style.position = "relative";
}
- curOffset = curElem.offset();
+ curOffset = curElem.offset() || { top: 0, left: 0 };
curCSSTop = jQuery.css( elem, "top" );
curCSSLeft = jQuery.css( elem, "left" );
calculatePosition = ( position === "absolute" || position === "fixed" ) &&