From 8f10993e99d3a60deedcac86c70732013d9999ec Mon Sep 17 00:00:00 2001 From: liuzhidan Date: Wed, 28 Feb 2018 16:29:06 +0800 Subject: [PATCH] fix #225 --- lib/fastclick.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/fastclick.js b/lib/fastclick.js index 86bf83e0..fddc5eb4 100644 --- a/lib/fastclick.js +++ b/lib/fastclick.js @@ -441,6 +441,8 @@ this.touchStartX = touch.pageX; this.touchStartY = touch.pageY; + // Fix fastclick stop to send "click" event after setting system clock back (issue #225) + if (event.timeStamp < this.lastClickTime) this.lastClickTime = 0; // Prevent phantom clicks on fast double-tap (issue #36) if ((event.timeStamp - this.lastClickTime) < this.tapDelay) { event.preventDefault();