Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "Draggable: Don't use computed style for top and left of posit…

…ion:relative elements. Fixes #5537 - Draggable: position relative draggable jumps on first drag in Opera"

This reverts commit dc94bbf.
  • Loading branch information...
commit 670ab819a9a6388393e2c1a73c1eaf7095bdc6e0 1 parent cb7eb69
Richard D. Worth rdworth authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 ui/jquery.ui.draggable.js
4 ui/jquery.ui.draggable.js
View
@@ -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 };
Please sign in to comment.
Something went wrong with that request. Please try again.