@@ -166,7 +166,7 @@ $.widget("ui.draggable", $.ui.mouse, {
166
166
} ) ;
167
167
168
168
//Generate the original position
169
- this . originalPosition = this . position = this . _generatePosition ( event ) ;
169
+ this . originalPosition = this . position = this . _generatePosition ( event , false ) ;
170
170
this . originalPageX = event . pageX ;
171
171
this . originalPageY = event . pageY ;
172
172
@@ -208,7 +208,7 @@ $.widget("ui.draggable", $.ui.mouse, {
208
208
}
209
209
210
210
//Compute the helpers position
211
- this . position = this . _generatePosition ( event ) ;
211
+ this . position = this . _generatePosition ( event , true ) ;
212
212
this . positionAbs = this . _convertPositionTo ( "absolute" ) ;
213
213
214
214
//Call plugins and callbacks and use the resulting position if something is returned
@@ -488,7 +488,7 @@ $.widget("ui.draggable", $.ui.mouse, {
488
488
489
489
} ,
490
490
491
- _generatePosition : function ( event ) {
491
+ _generatePosition : function ( event , constrainPosition ) {
492
492
493
493
var containment , co , top , left ,
494
494
o = this . options ,
@@ -513,7 +513,7 @@ $.widget("ui.draggable", $.ui.mouse, {
513
513
*/
514
514
515
515
// If we are not dragging yet, we won't check for options
516
- if ( this . originalPosition ) {
516
+ if ( constrainPosition ) {
517
517
if ( this . containment ) {
518
518
if ( this . relative_container ) {
519
519
co = this . relative_container . offset ( ) ;
0 commit comments