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 a2386a8250
commit dc49f62f22
2 changed files with 2 additions and 10 deletions

View File

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