Modify ↓
Ticket #6033 (closed bug: invalid)
.position().top returns incorrect results in IE6 and IE7
| Reported by: | chrisbarr | Owned by: | brandon |
|---|---|---|---|
| Priority: | major | Milestone: | 1.4.2 |
| Component: | offset | Version: | 1.4.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Head over to the .position() jQuery demo page: http://api.jquery.com/position/
In IE8, Firefox, Chrome the demo for .position().top returns 15
But in IE6 and IE7 it returns 34 - more than double what it should be.
In our project I'm having a similar problem, but a different result. The 'good' browsers return 71 and IE7 return 35 - but it actually works correctly in IE6.
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Thanks for the report, but this is not a jQuery bug. This is an IE hasLayout bug. The position is “accurate” in that it is where the browser is positioning the element, even though it doesn’t correspond to where it should be positioning it.