From 670ab819a9a6388393e2c1a73c1eaf7095bdc6e0 Mon Sep 17 00:00:00 2001 From: "Richard D. Worth" Date: Fri, 23 Apr 2010 16:13:06 -0400 Subject: [PATCH] Revert "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" This reverts commit dc94bbf53628ada1b5d8e7da909f63bfe10f25ff. --- ui/jquery.ui.draggable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index ba8a419f6..9496ce3f5 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[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 }; -- 2.39.5