Bug Tracker

Ticket #2618 (closed bug: wontfix)

Opened 7 years ago

Last modified 6 years ago

Draggable offset is incorrect in IE6 (in quirksmode)

Reported by: jdarren Owned by: brandon
Priority: major Milestone: 1.2.4
Component: ui Version: 1.2.3
Keywords: Cc:
Blocking: Blocked by:

Description

When rendering in IE6 (in quirksmode) the draggable offset is sometimes off by the amount of the document's scrollTop. It seems to be related to the use of the 'scroll=true' draggable option. See this thread for more context

 http://groups.google.com/group/jquery-ui/browse_thread/thread/6141c76d085c54bd/a455e57e2bebbe71#a455e57e2bebbe71

Also, the issue can be demonstrated here:

 http://cobalt.scorpiontechnology.com/test/DragTest.htm  http://cobalt.scorpiontechnology.com/test/DragTestQuirks.htm

Change History

comment:1 Changed 7 years ago by jdarren

don't want to pester, but does anyone have a sense for when this bug will be reviewed/addressed? If someone could post a patch or work-around that would be really great. I'm quickly approaching a code-freeze and this bug is a big-time show stopper for me.

thx.

comment:2 Changed 7 years ago by paul

  • Owner changed from paul to braeker

comment:3 Changed 6 years ago by jdarren

After doing more research it seems this issue lies in the realm of the jQuery offset() method. But what's odd about it is that the doc's for this method say:

"Get the current offset of the first matched element relative to the viewport."

... which is more or less what offset() is doing for IE in quirksmode. (rather than relative to the document). So it begs the question, is the offset() method actually behaving correctly for IE in quirksmode and incorrectly for all other browsers, or are the docs wrong?

comment:4 Changed 6 years ago by paul

The docs are wrong in this case - the offset method does include the scroll ofssets, meaning it should return the absolute position of the element in that page, including all offsets.

comment:5 Changed 6 years ago by paul

  • Owner changed from braeker to paul
  • Status changed from new to assigned

comment:6 Changed 6 years ago by paul

  • Owner changed from paul to brandon
  • Status changed from assigned to new

comment:7 Changed 6 years ago by brandon

  • Status changed from new to closed
  • Resolution set to wontfix

The issue arrises when you zero-out the html border ... usually from using a CSS reset framework. This offset is usually represented by the clientLeft/Top properties but IE6 and 7 in quirksmode do not reflect the zero'd out border. If you're app is still in quirks mode simply add 2 px to the offset values found in IE. Annoying yes but such is IE and quirks mode.

This workaround isn't going into the core because we do not officially support quirks mode and are keeping offset as slim as possible for performance and maintenance concerns.

Note: See TracTickets for help on using tickets.