Skip to main content

Bug Tracker

Side navigation

#7496 closed bug (worksforme)

Opened November 13, 2010 02:41AM UTC

Closed November 13, 2010 05:41PM UTC

Set Offset doesn't work correctly if page is scrolled

Reported by: dan@manifestwebdesign.com Owned by: dan@manifestwebdesign.com
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.

Attachments (0)
Change History (3)

Changed November 13, 2010 05:22AM UTC by boushley comment:1

owner: → dan@manifestwebdesign.com
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.

Changed November 13, 2010 05:45AM UTC by anonymous comment:2

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...

Changed November 13, 2010 05:41PM UTC by dmethvin comment:3

resolution: → worksforme
status: pendingclosed