#1226 new
Peter Schrammel

getOffsetParent bug in ie7

Reported by Peter Schrammel | March 18th, 2011 @ 08:17 AM

After an update from 1.6.1 to 1.7 some of our autosuggest fields were missplaced. I found that under some weird circumstances getParentOffset returns the HTML element and that seems not to have a viewportOffset (at least it's always 0 0).

After a quick patch in getParentOffset:

 var isInline = (Element.getStyle(element, 'display') === 'inline');
- if (!isInline && element.offsetParent) return $(element.offsetParent);
+ if (!isInline && element.offsetParent) return isHtml(element.offsetParent) ? $(document.body) : $(element.offsetParent);

Before discussing the patch can anybody confirm this bug?

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins

People watching this ticket