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
1 changed files with 2 additions and 2 deletions
|
@ -35,13 +35,13 @@ if ( "getBoundingClientRect" in document.documentElement ) {
|
||||||
var offsetParent = elem.offsetParent, prevOffsetParent = elem,
|
var offsetParent = elem.offsetParent, prevOffsetParent = elem,
|
||||||
doc = elem.ownerDocument, computedStyle, docElem = doc.documentElement,
|
doc = elem.ownerDocument, computedStyle, docElem = doc.documentElement,
|
||||||
body = doc.body, defaultView = doc.defaultView,
|
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;
|
top = elem.offsetTop, left = elem.offsetLeft;
|
||||||
|
|
||||||
while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
|
while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
|
||||||
if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) { break; }
|
if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) { break; }
|
||||||
|
|
||||||
computedStyle = defaultView.getComputedStyle(elem, null);
|
computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;
|
||||||
top -= elem.scrollTop;
|
top -= elem.scrollTop;
|
||||||
left -= elem.scrollLeft;
|
left -= elem.scrollLeft;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue