File tree 1 file changed +16
-1
lines changed
1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 835
835
|| ( href . replace ( "://" , "" ) . split ( "/" ) [ 0 ] !== location . href . replace ( "://" , "" ) . split ( "/" ) [ 0 ] && ajax != "true" )
836
836
|| ( Mobilebone . captureLink == false && ajax != "true" )
837
837
) return ;
838
-
839
838
event . preventDefault ( ) ;
840
839
} ) ;
841
840
}
849
848
* If 'a' element has href, slide auto when tapping~
850
849
**/
851
850
Mobilebone . handleTapEvent = function ( event ) {
851
+ /**
852
+ // iscroll(set tap: true) may cause twice tap problem
853
+ // which is none of Mobilebone's business
854
+ // However, you can let code below go to avoid twice tap in Mobilebone
855
+ // but the tap event bind out of Mobilebone also has bug
856
+ // so my advice is that:
857
+ // 1. use Date.now to judge as Mobilebone did;
858
+ // or
859
+ // 2. keep this code in the form of comment and fixed bug outside
860
+ if (store.timerTap && Date.now() - store.timerTap < 100) {
861
+ event.preventDefault();
862
+ return false;
863
+ }
864
+ store.timerTap = Date.now();
865
+ */
866
+
852
867
// get target and href
853
868
var target = event . target || event . touches [ 0 ] , href = target . href ;
854
869
if ( ( ! href || / a / i. test ( target . tagName ) == false ) && ( target = target . getParentElementByTag ( "a" ) ) ) {
You can’t perform that action at this time.
0 commit comments