Bug Tracker

Ticket #2618 (closed bug: wontfix)

Opened 8 months ago

Last modified 7 months ago

Draggable offset is incorrect in IE6 (in quirksmode)

Reported by: jdarren Assigned to: brandon
Type: bug Priority: major
Milestone: 1.2.4 Component: ui
Version: 1.2.3 Keywords:
Cc: Needs: Review

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

Attachments

Change History

Changed 8 months 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.

Changed 8 months ago by paul

  • owner changed from paul to braeker

Changed 8 months 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?

Changed 8 months 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.

Changed 8 months ago by paul

  • owner changed from braeker to paul
  • status changed from new to assigned

Changed 8 months ago by paul

  • owner changed from paul to brandon
  • status changed from assigned to new

Changed 7 months 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.