mirror of
https://github.com/jquery/jquery-ui.git
synced 2026-04-20 03:02:41 -04:00
Draggable: Don't recalculate the relative offset during drag. I couldn't reproduce the issues described in the comments for this code.
Fixes #4824 - draggable broken on inline elements in webkit browsers
This commit is contained in:
9
ui/jquery.ui.draggable.js
vendored
9
ui/jquery.ui.draggable.js
vendored
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user