Bug Tracker

Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#10454 closed bug (invalid)

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

Reported by: m@… 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.

Change History (2)

comment:1 Changed 7 years ago by timmywil

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

comment:2 Changed 6 years ago by chanibal

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

Note: See TracTickets for help on using tickets.