File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 12
12
; ( function ( $ , undefined ) {
13
13
14
14
var rkeyEvent = / ^ k e y / ,
15
- rmouseEvent = / ^ (?: m o u s e | c o n t e x t m e n u ) | c l i c k / ;
15
+ rmouseEvent = / ^ (?: m o u s e | c o n t e x t m e n u ) | c l i c k / ,
16
+ rtouchEvent = / ^ t o u c h / ;
16
17
17
18
$ . fn . simulate = function ( type , options ) {
18
19
return this . each ( function ( ) {
@@ -82,13 +83,16 @@ $.extend( $.simulate.prototype, {
82
83
if ( rmouseEvent . test ( type ) ) {
83
84
return this . mouseEvent ( type , options ) ;
84
85
}
86
+ else if ( rtouchEvent . test ( type ) ) {
87
+ return this . mouseEvent ( type , options ) ;
88
+ }
85
89
} ,
86
90
87
91
mouseEvent : function ( type , options ) {
88
92
var event , eventDoc , doc , body ;
89
93
options = $ . extend ( {
90
94
bubbles : true ,
91
- cancelable : ( type !== "mousemove" ) ,
95
+ cancelable : ( type !== "mousemove" && type !== "touchmove" ) ,
92
96
view : window ,
93
97
detail : 0 ,
94
98
screenX : 0 ,
You can’t perform that action at this time.
0 commit comments