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];