Ticket #262 (closed defect: fixed)

Opened 1 year ago

Last modified 5 months ago

getElementPosition and IE

Reported by: jsensi Assigned to: somebody
Priority: normal Milestone: MochiKit 1.4
Component: component1 Version:
Severity: normal Keywords:
Cc:

Description

getElementPosition function misses a "return" in the IE shorcut. Whitout this "return", IE return wrong positions for elements in scrolled blocks.

As in my previous ticket, this small fix is directly inspired from the latest YUI.

} else if (elem.getBoundingClientRect) { // IE shortcut

    box = elem.getBoundingClientRect();

    c.x += box.left +
        (de.scrollLeft || b.scrollLeft) -
        (de.clientLeft || 0);

    c.y += box.top +
        (de.scrollTop || b.scrollTop) -
        (de.clientTop || 0);
        
    return c;

} else if (elem.offsetParent) {

Change History

08/09/07 03:19:27 changed by therve@gmail.com

  • status changed from new to closed.
  • resolution set to fixed.

Thanks, applied in [1311].

03/30/08 09:52:46 changed by cederberg@gmail.com

Oops. This fix broke some tests in IE, seems the releativeTo is not handled after this. See #265.