Bug Tracker

Opened 15 years ago

Closed 15 years ago

Last modified 12 years ago

#4202 closed bug (wontfix)

Webkit: offset, body position relative

Reported by: braddunbar Owned by: brandon
Priority: major Milestone: 1.4
Component: offset Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:


When the position of the body is relative, offset does not take into account the offset of the body from the html element.

In the attached file this is shown by attempting to calculate the left offset of a div within the body.

Firefox 3.0.6 and IE7 report correct values.

Safari 3.2.2 and Chrome report incorrect values.

Attachments (1)

offset.html (546 bytes) - added by braddunbar 15 years ago.
Test Case showing incorrect offset calculation for relative position on body

Download all attachments as: .zip

Change History (3)

Changed 15 years ago by braddunbar

Attachment: offset.html added

Test Case showing incorrect offset calculation for relative position on body

comment:1 Changed 15 years ago by brandon

Resolution: wontfix
Status: newclosed

The last time I looked into this particular issue it had further reaching issues in all browsers and required a lot of code. The amount of code it required did not justify this particular edge-case to be fixed, especially when the workaround is so easy. Just use a container/wrapper div instead of the body tag.

With that said, I'll look into the issue again... make sure I didn't miss anything before. :)

comment:2 Changed 15 years ago by braddunbar

I agree that the fix is easy, but you don't always have control over the markup your plugin will be deployed with.

I actually found the issue when using a jquery UI plugin that inexplicably started getting the wrong offset.

I would like to look into this a bit more. Would you mind sending me a synopsis of your findings the first time around? Anything at all would be helpful.


Note: See TracTickets for help on using tickets.