#2307 closed bug (fixed)
IE6: Dialog jumps up so mouse is at bottom of titlebar when dragged
Reported by: | rworth | Owned by: | paul |
---|---|---|---|
Priority: | major | Milestone: | 1.5 |
Component: | ui.core | Version: | 1.2.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When you drag a dialog in IE6, it jumps up a little so the mouse cursor is at the bottom of the titlebar. See:
http://dev.jquery.com/view/trunk/ui/tests/uiTest.dialog.html test: [default]
Change History (12)
comment:1 Changed 15 years ago by
Owner: | changed from paul to rworth |
---|
comment:2 Changed 15 years ago by
comment:3 Changed 15 years ago by
Status: | new → assigned |
---|
comment:4 Changed 15 years ago by
I think the proper solution is to modify the offset() method to add on the body's margin if the element is absolutely positioned and a direct descendant of the body.
comment:5 Changed 15 years ago by
Owner: | changed from rworth to scott.gonzalez |
---|---|
Status: | assigned → new |
comment:6 Changed 15 years ago by
Component: | ui → offset |
---|---|
Milestone: | 1.2.3 → 1.2.4 |
Owner: | changed from scott.gonzalez to brandon |
comment:7 Changed 15 years ago by
Owner: | changed from brandon to paul |
---|
I believe the issue is on line 163-4 of ui.draggable.js
this.offsetParentOffset = this.offsetParent.offset(); var elementPosition = { left: this.elementOffset.left - this.offsetParentOffset.left, top: this.elementOffset.top - this.offsetParentOffset.top };
The offsetParent is the body element and in IE6 it is reporting the margin which you obviously do not want to actually apply when an element is absolute. It looks like you are trying to get the position of an element. Unfortunately just subtracting two offsets will not give you the real position. Check out the dimensions position method for getting the position of an element relative to its true offsetParent. As a side note, the offset method doesn't officially support the body element.
Let me know if I've missed anything or if I can help out.
comment:8 Changed 15 years ago by
Component: | offset → ui |
---|
comment:9 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:12 Changed 14 years ago by
Milestone: | → 1.5 |
---|
This only occurs when there is a margin on the body element.