Bug Tracker

Opened 11 years ago

Closed 11 years ago

#3322 closed bug (wontfix)

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

Change History (4)

comment:1 Changed 11 years ago by flesler

Cc: ajpotts flesler added
Component: coreoffset
Owner: set to brandon

comment:2 Changed 11 years ago by ajpotts

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.

comment:3 Changed 11 years ago by ajpotts

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

comment:4 Changed 11 years ago by brandon

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.

Note: See TracTickets for help on using tickets.