From ef78a973ef5f383250bc64eff848c83748def55a Mon Sep 17 00:00:00 2001 From: John Bintz Date: Wed, 6 Jan 2010 16:52:58 -0500 Subject: [PATCH] potential workaround for IE 6 issue where element can become something other than a DOM node --- src/dom/dom.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dom/dom.js b/src/dom/dom.js index 86f3b77..984b52d 100644 --- a/src/dom/dom.js +++ b/src/dom/dom.js @@ -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); },