File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -295,6 +295,7 @@ $.extend( $.simulate.prototype, {
295
295
simulateDrag : function ( ) {
296
296
var i = 0 ,
297
297
target = this . target ,
298
+ eventDoc = target . ownerDocument ,
298
299
options = this . options ,
299
300
center = options . handle === "corner" ? findCorner ( target ) : findCenter ( target ) ,
300
301
x = Math . floor ( center . x ) ,
@@ -315,14 +316,14 @@ $.extend( $.simulate.prototype, {
315
316
clientY : Math . round ( y )
316
317
} ;
317
318
318
- this . simulateEvent ( target . ownerDocument , "mousemove" , coord ) ;
319
+ this . simulateEvent ( eventDoc , "mousemove" , coord ) ;
319
320
}
320
321
321
- if ( $ . contains ( document , target ) ) {
322
+ if ( $ . contains ( eventDoc , target ) ) {
322
323
this . simulateEvent ( target , "mouseup" , coord ) ;
323
324
this . simulateEvent ( target , "click" , coord ) ;
324
325
} else {
325
- this . simulateEvent ( document , "mouseup" , coord ) ;
326
+ this . simulateEvent ( eventDoc , "mouseup" , coord ) ;
326
327
}
327
328
}
328
329
} ) ;
You can’t perform that action at this time.
0 commit comments