From 1c21c2f1b6db8b4135adf6bd478e02273e786d20 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Tue, 12 Jan 2010 14:46:52 -0500 Subject: [PATCH] remaining IE6 fixes for offset positioning where null objects are being returned --- src/dom/dom.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/dom/dom.js b/src/dom/dom.js index 7b02f64..6f2d12e 100644 --- a/src/dom/dom.js +++ b/src/dom/dom.js @@ -1580,8 +1580,9 @@ else if (Prototype.Browser.IE) { // Trigger hasLayout on the offset parent so that IE6 reports // accurate offsetTop and offsetLeft values for position: fixed. var offsetParent = element.getOffsetParent(); - if (offsetParent && offsetParent.getStyle('position') === 'fixed') - offsetParent.setStyle({ zoom: 1 }); + if (offsetParent.getStyle) + if (offsetParent && offsetParent.getStyle('position') === 'fixed') + offsetParent.setStyle({ zoom: 1 }); element.setStyle({ position: 'relative' }); var value = proceed(element); element.setStyle({ position: position }); @@ -1592,6 +1593,9 @@ else if (Prototype.Browser.IE) { Element.Methods.getStyle = function(element, style) { element = $(element); + if (!element.style) + return null; + style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize(); var value = element.style[style]; if (!value && element.currentStyle) value = element.currentStyle[style];