Skip to content

Commit cb30c97

Browse files
author
zhangxinxu
committed
change twice tap bug strategy
change twice tap bug strategy
1 parent a4b5acf commit cb30c97

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/mobilebone.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,12 +848,20 @@
848848
* If 'a' element has href, slide auto when tapping~
849849
**/
850850
Mobilebone.handleTapEvent = function(event) {
851+
/**
851852
// 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+
// 2. keep this code in the form of comment and fixed bug outside
852859
if (store.timerTap && Date.now() - store.timerTap < 100) {
853860
event.preventDefault();
854861
return false;
855862
}
856863
store.timerTap = Date.now();
864+
*/
857865

858866
// get target and href
859867
var target = event.target || event.touches[0], href = target.href;

0 commit comments

Comments
 (0)