Skip to content

Commit

Permalink
Fixes #794. offsetparent is defined here http://www.quirksmode.org/do…
Browse files Browse the repository at this point in the history
…m/w3c_cssom.html#offsetParent. Current implementation would return null on IE if it reaches the body as offsetparent.
  • Loading branch information
fabiomcosta authored and cpojer committed Jun 9, 2010
1 parent be7daa6 commit b461ca9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Element/Element.Dimensions.js
Expand Up @@ -61,8 +61,8 @@ Element.implement({
var element = this;
if (isBody(element)) return null;
if (!Browser.ie) return element.offsetParent;
while ((element = element.parentNode) && !isBody(element)){
if (styleString(element, 'position') != 'static') return element;
while ((element = element.parentNode)){
if (styleString(element, 'position') != 'static' || isBody(element)) return element;
}
return null;
},
Expand Down

0 comments on commit b461ca9

Please sign in to comment.