Side navigation
#4031 closed bug (worksforme)
Opened January 30, 2009 04:15PM UTC
Closed February 01, 2009 03:22PM UTC
offset function in jquery.dimensions.js broken in IE
Reported by: | nicholaus.ames | Owned by: | brandon |
---|---|---|---|
Priority: | minor | Milestone: | 1.3.2 |
Component: | dimensions | Version: | 1.3.1 |
Keywords: | offset, IE | Cc: | |
Blocked by: | Blocking: |
Description
When making a draggable litebox in IE. I get an error on line 445. It encounters a null parent but continues trying to calculate the offset.
Adding a check for a null parent, fixes this in some versions of IE.
if (options.scroll && parent) {
get scroll offsets
sl += parent.scrollLeft;
st += parent.scrollTop;
}
Opera sometimes incorrectly reports scroll offset for elements with display set to table-row or inline
if (oa && ($.css(parent, 'display') || '').match(/table-row|inline/)) {
sl = sl - ((parent.scrollLeft == parent.offsetLeft) ? parent.scrollLeft : 0);
st = st - ((parent.scrollTop == parent.offsetTop) ? parent.scrollTop : 0);
}
// Mozilla does not add the border for a parent that has overflow set to anything but visible
if (mo && parent != elem && $.css(parent, 'overflow') != 'visible') {
x += num(parent, 'borderLeftWidth');
y += num(parent, 'borderTopWidth');
}
if(parent) {
parent = parent.parentNode;
}
} while (parent != op && parent);
Updating to the latest from the download page totally fixed this.