Skip to main content

Bug Tracker

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

Attachments (0)
Change History (2)

Changed January 30, 2009 04:28PM UTC by nicholaus.ames comment:1

Updating to the latest from the download page totally fixed this.

Changed February 01, 2009 03:22PM UTC by dmethvin comment:2

resolution: → worksforme
status: newclosed