Skip to main content

Bug Tracker

Side navigation

#10454 closed bug (invalid)

Opened October 08, 2011 03:15AM UTC

Closed October 08, 2011 04:33PM UTC

Last modified November 25, 2012 06:11AM UTC

offset().top returns wrong value for fixed elements and their children when page is scrolled

Reported by: m@tribalvibes.com Owned by:
Priority: low Milestone: None
Component: offset Version: 1.6.4
Keywords: Cc:
Blocked by: Blocking:
Description

Just what the summary says. Chrome v14.0.835.202. jQuery 1.6.4.

The value of offset().top for fixed elements and their children appear to have the value of $(window).scrollTop() added to what the correct value should be. This screws up positioning pop-up elements relative to the fixed element or child.

Attachments (0)
Change History (2)

Changed October 08, 2011 04:33PM UTC by timmywil comment:1

component: unfiledoffset
priority: undecidedlow
resolution: → invalid
status: newclosed

It seems to me that fixed positioning should not affect offset. Offset deals with the position of the element relative to the rest of the document, which is not the same as .css('top')

Changed November 25, 2012 06:11AM UTC by chanibal comment:2

Confirmed in webkit in some androids < 4.0.4 (all from Samsung's touchwiz custom ROM)