Bug Tracker

Opened 11 years ago

Closed 11 years ago

#12559 closed bug (invalid)

.position() and .offset() fail within overflow-scrolled elements

Reported by: glennwidener@… Owned by: glennwidener@…
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:


jQuery dimensions functions (position and offset) are broken when applied to elements inside an overflow-scrolled element. e.g offset() calls getBoundingClientRect and adjusts it's viewport-relative position to an absolute position for window/iframe scrolling ONLY. I'm pretty sure this is the problem, because if I force the overflow-y:scroll element to scrollTop=0 before calling the functions, all is well... Also, disabling use of getBoundingClientRect doesn't help, so the built-in .offset() code is broken as well (This code was removed by v1.8.1).

Tested in Chrome 21.0.1180/Windows.

Change History (2)

comment:1 Changed 11 years ago by dmethvin

Owner: set to glennwidener@…
Status: newpending

Hi, can you provide a test case to go with the story? Something on jsFiddle.net would be ideal. We're planning on 1.8.2 later this week so it would be great if you could give us a test case and as much additional info as possible.

comment:2 Changed 11 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.