]> source.dussan.org Git - jquery-ui.git/commitdiff
Revert "Draggable: Don't use computed style for top and left of position:relative...
authorRichard D. Worth <rdworth@gmail.com>
Fri, 23 Apr 2010 20:13:06 +0000 (16:13 -0400)
committerRichard D. Worth <rdworth@gmail.com>
Fri, 23 Apr 2010 20:13:06 +0000 (16:13 -0400)
This reverts commit dc94bbf53628ada1b5d8e7da909f63bfe10f25ff.

ui/jquery.ui.draggable.js

index ba8a419f6bc00ab7e05061791dc114b0a54195f9..9496ce3f5490db47356efb7c7f6eeb94acd6821e 100644 (file)
@@ -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[0].style.top,10) || 0) + this.scrollParent.scrollTop(),
-                               left: p.left - (parseInt(this.helper[0].style.left,10) || 0) + this.scrollParent.scrollLeft()
+                               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()
                        };
                } else {
                        return { top: 0, left: 0 };