Skip to main content

Bug Tracker

Side navigation

#3322 closed bug (wontfix)

Opened September 04, 2008 12:32PM UTC

Closed November 13, 2008 03:05AM UTC

offset body does not work in Safari / Chrome

Reported by: ajpotts Owned by: brandon
Priority: major Milestone: 1.3
Component: offset Version: 1.2.6
Keywords: Cc: ajpotts, flesler
Blocked by: Blocking:
Description

If the BODY is offset from the HTML then offset should report that number - but it's zero in webkit.

Test case here:

http://www.partyark.co.uk/html/jqueryoffsetbody.html

Attachments (0)
Change History (4)

Changed September 04, 2008 08:52PM UTC by flesler comment:1

cc: → ajpotts, flesler
component: coreoffset
owner: → brandon

Changed September 08, 2008 09:04AM UTC by ajpotts comment:2

Addition: though this might seem an esoteric case, in fact if you make body { position: relative } then offset is going to be wrong for _all the time_ in Safari/Chrome, because it will miss the last step.

Styling the body with margin for centering or whatever is not uncommon: it means avoiding wrapping everything in an extra div tag. And if you do that, then you're likely to do a position:relative because you're most likely to want everything relative to the body than the html.

Changed September 10, 2008 08:39AM UTC by ajpotts comment:3

Firefox2 also does not get this right for exactly the same reasons.

Changed November 13, 2008 03:05AM UTC by brandon comment:4

resolution: → wontfix
status: newclosed

Adding position relative to the body element opens up a huge mess when dealing with offset. Margin is okay in the latest SVN but position relative and borders just wreak havoc.