Bug Tracker

Opened 11 years ago

Closed 11 years ago

#4031 closed bug (worksforme)

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

Change History (2)

comment:1 Changed 11 years ago by nicholaus.ames

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

comment:2 Changed 11 years ago by dmethvin

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.