Skip to content
Permalink
Browse files

Draggable: Don't recalculate the relative offset during drag. I could…

…n't reproduce the issues described in the comments for this code.

Fixes #4824 - draggable broken on inline elements in webkit browsers
  • Loading branch information
scottgonzalez committed Feb 14, 2010
1 parent 0f3def0 commit f88677bfd68cce469d261d7ecc727d549def3340
Showing with 0 additions and 9 deletions.
  1. +0 −9 ui/jquery.ui.draggable.js
@@ -382,15 +382,6 @@ $.widget("ui.draggable", $.ui.mouse, {
_generatePosition: function(event) {

var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);

// This is another very weird special case that only happens for relative elements:
// 1. If the css position is relative
// 2. and the scroll parent is the document or similar to the offset parent
// we have to refresh the relative offset during the scroll so there are no jumps
if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) {
this.offset.relative = this._getRelativeOffset();
}

var pageX = event.pageX;
var pageY = event.pageY;

0 comments on commit f88677b

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