Bug Tracker

Opened 9 years ago

Closed 9 years ago

#7496 closed bug (worksforme)

Set Offset doesn't work correctly if page is scrolled

Reported by: dan@… Owned by: dan@…
Priority: undecided Milestone: 1.5
Component: unfiled Version: 1.4.2
Keywords: Cc:
Blocked by: Blocking:

Description

Elements positioned with offset appear to be positioned to the viewport instead of to the document. So $(element).offset({left: 100, top: 100}) would position the element at top: 200 if the page was scrolled by 100 pixels.

Change History (3)

comment:1 Changed 9 years ago by boushley

Owner: set to dan@…
Status: newpending

Thanks for contributing to the jQuery project. I've created a jsFiddle for the use case you're describing but can't reproduce the problem. http://jsfiddle.net/boushley/hMCDb/1/ I'm testing this on Google Chrome on a Mac, if you could provide a reproducible test case that would be great.

comment:2 Changed 9 years ago by anonymous

Scratch that...I did some more testing and it's not that simple. It is doing what I reported, but I'm not sure how to reproduce it...

comment:3 Changed 9 years ago by dmethvin

Resolution: worksforme
Status: pendingclosed
Note: See TracTickets for help on using tickets.