Fixed the case where getComputedStyled was assumed to exist if getBoundingClientRect did (which isn't the case on the Playstation 3). Fixes #5467.
This commit is contained in:
parent
339708cda9
commit
9a371e2d93
|
@ -35,13 +35,13 @@ if ( "getBoundingClientRect" in document.documentElement ) {
|
|||
var offsetParent = elem.offsetParent, prevOffsetParent = elem,
|
||||
doc = elem.ownerDocument, computedStyle, docElem = doc.documentElement,
|
||||
body = doc.body, defaultView = doc.defaultView,
|
||||
prevComputedStyle = defaultView.getComputedStyle( elem, null ),
|
||||
prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
|
||||
top = elem.offsetTop, left = elem.offsetLeft;
|
||||
|
||||
while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
|
||||
if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) { break; }
|
||||
|
||||
computedStyle = defaultView.getComputedStyle(elem, null);
|
||||
computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;
|
||||
top -= elem.scrollTop;
|
||||
left -= elem.scrollLeft;
|
||||
|
||||
|
|
Loading…
Reference in a new issue