Offset: allow offset setter to throw for disconnected elements

Fixes gh-2114
This commit is contained in:
Timmy Willison
2015-05-05 08:33:50 -07:00
parent 6176567361
commit 0d11c1182f
2 changed files with 2 additions and 10 deletions

View File

@@ -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" ) &&