Opened 14 years ago
Closed 14 years ago
#3384 closed bug (invalid)
Dragging in IE 7 Generates Incorrect Position
Reported by: | Phillip Singer | Owned by: | flesler |
---|---|---|---|
Priority: | major | Milestone: | 1.3 |
Component: | unfiled | Version: | 1.2.6 |
Keywords: | ui ie7 ie drag draggable position scroll | Cc: | |
Blocked by: | Blocking: |
Description
Environment:
- Windows XP Pro
- IE 7
- JQuery UI 1.6RC1
Symptoms: Dragging works fine when at the top of the page. However, when scrolled down the page, the calculated top position is off by exactly the scrolled amount.
Suggested Resolution: In ui.draggable.js, replace the following lines at the top of the _generatePosition function:
- line 174:
- original
- original
(this.cssPosition == "absolute" && this.offsetParent[0] == document.body) ? 0 : (this.scrollTopParent[0].scrollTop | 0)) The offsetParent's scroll position, not if the element is fixed |
- fixed:
(this.cssPosition == "absolute" && this.offsetParent[0] == document.body) ? 0 : ($.browser.msie ? 0 : this.scrollTopParent[0].scrollTop | 0)) The offsetParent's scroll position, not if the element is fixed |
- line 182:
- original
- original
(this.cssPosition == "absolute" && this.offsetParent[0] == document.body) ? 0 : (this.scrollLeftParent[0].scrollLeft | 0)) The offsetParent's scroll position, not if the element is fixed |
- fixed
(this.cssPosition == "absolute" && this.offsetParent[0] == document.body) ? 0 : ($.browser.msie ? 0 : this.scrollLeftParent[0].scrollLeft | 0)) The offsetParent's scroll position, not if the element is fixed |
Note: See
TracTickets for help on using
tickets.
Please repost this to the UI Bug Tracker.