mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
draggable: position and offset were undefined in start callback, fixes #4380
This commit is contained in:
parent
2189deaa2c
commit
14922e41da
@ -83,7 +83,7 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
|
||||
this.scrollParent = this.helper.scrollParent();
|
||||
|
||||
//The element's absolute position on the page minus margins
|
||||
this.offset = this.element.offset();
|
||||
this.offset = this.positionAbs = this.element.offset();
|
||||
this.offset = {
|
||||
top: this.offset.top - this.margins.top,
|
||||
left: this.offset.left - this.margins.left
|
||||
@ -99,7 +99,7 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
|
||||
});
|
||||
|
||||
//Generate the original position
|
||||
this.originalPosition = this._generatePosition(event);
|
||||
this.originalPosition = this.position = this._generatePosition(event);
|
||||
this.originalPageX = event.pageX;
|
||||
this.originalPageY = event.pageY;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user