diff options
author | Richard D. Worth <rdworth@gmail.com> | 2010-04-22 09:56:35 -0400 |
---|---|---|
committer | Richard D. Worth <rdworth@gmail.com> | 2010-04-22 09:56:35 -0400 |
commit | dc94bbf53628ada1b5d8e7da909f63bfe10f25ff (patch) | |
tree | 8011bd7ff35e674a5bf5db2c5e6c8f6f0511da5a /ui | |
parent | 49f8c1c60326f4b98592a1d1cee38982770557a4 (diff) | |
download | jquery-ui-dc94bbf53628ada1b5d8e7da909f63bfe10f25ff.tar.gz jquery-ui-dc94bbf53628ada1b5d8e7da909f63bfe10f25ff.zip |
Draggable: Don't use computed style for top and left of position:relative elements. Fixes #5537 - Draggable: position relative draggable jumps on first drag in Opera
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.draggable.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index 9496ce3f5..ba8a419f6 100644 --- a/ui/jquery.ui.draggable.js +++ b/ui/jquery.ui.draggable.js @@ -305,8 +305,8 @@ $.widget("ui.draggable", $.ui.mouse, { if(this.cssPosition == "relative") { var p = this.element.position(); return { - top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), - left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() + top: p.top - (parseInt(this.helper[0].style.top,10) || 0) + this.scrollParent.scrollTop(), + left: p.left - (parseInt(this.helper[0].style.left,10) || 0) + this.scrollParent.scrollLeft() }; } else { return { top: 0, left: 0 }; |