From 72dc645624d105f33906c940301535b363ed72ea Mon Sep 17 00:00:00 2001 From: AmdY Date: Fri, 30 May 2014 02:29:26 +0300 Subject: [PATCH] Fix double triggering in some browsers with touch --- jquery.longpress.js | 1 + 1 file changed, 1 insertion(+) diff --git a/jquery.longpress.js b/jquery.longpress.js index b061ece..ca32cfd 100644 --- a/jquery.longpress.js +++ b/jquery.longpress.js @@ -29,6 +29,7 @@ // mousedown or touchstart callback function mousedown_callback(e) { + clearTimeout(timeout); mouse_down_time = new Date().getTime(); var context = $(this);