#10454 closed bug (invalid)
offset().top returns wrong value for fixed elements and their children when page is scrolled
Reported by: | 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 11 years ago by
Component: | unfiled → offset |
---|---|
Priority: | undecided → low |
Resolution: | → invalid |
Status: | new → closed |
comment:2 Changed 10 years ago by
Confirmed in webkit in some androids < 4.0.4 (all from Samsung's touchwiz custom ROM)
Note: See
TracTickets for help on using
tickets.
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')