potential workaround for IE 6 issue where element can become something other than a DOM node

This commit is contained in:
John Bintz 2010-01-06 16:52:58 -05:00
parent 6839886699
commit ef78a973ef

View File

@ -1317,8 +1317,9 @@ Element.Methods = {
if (element == document.body) return $(element);
while ((element = element.parentNode) && element != document.body)
if (Element.getStyle(element, 'position') != 'static')
return $(element);
if (element.style)
if (Element.getStyle(element, 'position') != 'static')
return $(element);
return $(document.body);
},