remaining IE6 fixes for offset positioning where null objects are being returned

This commit is contained in:
John Bintz 2010-01-12 14:46:52 -05:00
parent 8a5b3209f4
commit 1c21c2f1b6
1 changed files with 6 additions and 2 deletions

View File

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