Skip to content
Permalink
Browse files

Draggable: Don't use computed style for top and left of position:rela…

…tive elements. Fixes #5537 - Draggable: position relative draggable jumps on first drag in Opera
  • Loading branch information...
rdworth committed Apr 22, 2010
1 parent 49f8c1c commit dc94bbf53628ada1b5d8e7da909f63bfe10f25ff
Showing with 2 additions and 2 deletions.
  1. +2 −2 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 };

0 comments on commit dc94bbf

Please sign in to comment.
You can’t perform that action at this time.