File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 233
233
// Less Precision with touch input
234
234
margin = supportsTouch || supportsPointerEvent ? 20 : 10 ,
235
235
236
+ // for ignoring taps from browser's simulated mouse events
237
+ prevTouchTapTime = 0 ,
238
+
236
239
// Allow this many interactions to happen simultaneously
237
240
maxInteractions = 1 ,
238
241
2354
2357
2355
2358
this . tapTime = tap . timeStamp ;
2356
2359
2360
+ if ( ! this . mouse ) {
2361
+ prevTouchTapTime = this . tapTime ;
2362
+ }
2363
+
2357
2364
for ( i = 0 ; i < targets . length ; i ++ ) {
2358
2365
var origin = getOriginXY ( targets [ i ] , elements [ i ] ) ;
2359
2366
2397
2404
} ,
2398
2405
2399
2406
collectTaps : function ( pointer , event , eventTarget ) {
2400
- if ( this . pointerWasMoved || ! ( this . downTarget && this . downTarget === eventTarget ) ) {
2407
+ if ( this . pointerWasMoved
2408
+ || ! ( this . downTarget && this . downTarget === eventTarget )
2409
+ || ( this . mouse && ( new Date ( ) . getTime ( ) - prevTouchTapTime ) < 300 ) ) {
2401
2410
return ;
2402
2411
}
2403
2412
You can’t perform that action at this time.
0 commit comments