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, {
295295 simulateDrag : function ( ) {
296296 var i = 0 ,
297297 target = this . target ,
298+ eventDoc = target . ownerDocument ,
298299 options = this . options ,
299300 center = options . handle === "corner" ? findCorner ( target ) : findCenter ( target ) ,
300301 x = Math . floor ( center . x ) ,
@@ -315,14 +316,14 @@ $.extend( $.simulate.prototype, {
315316 clientY : Math . round ( y )
316317 } ;
317318
318- this . simulateEvent ( target . ownerDocument , "mousemove" , coord ) ;
319+ this . simulateEvent ( eventDoc , "mousemove" , coord ) ;
319320 }
320321
321- if ( $ . contains ( document , target ) ) {
322+ if ( $ . contains ( eventDoc , target ) ) {
322323 this . simulateEvent ( target , "mouseup" , coord ) ;
323324 this . simulateEvent ( target , "click" , coord ) ;
324325 } else {
325- this . simulateEvent ( document , "mouseup" , coord ) ;
326+ this . simulateEvent ( eventDoc , "mouseup" , coord ) ;
326327 }
327328 }
328329} ) ;
You can’t perform that action at this time.
0 commit comments