[Pkg-javascript-commits] [leaflet] 13/40: make Android double-click issue threshold smaller, close #2303

Jonas Smedegaard dr at jones.dk
Thu Oct 16 16:33:07 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository leaflet.

commit 4b9f5f420b18ce721959e6476c803d87e4e9a594
Author: Vladimir Agafonkin <agafonkin at gmail.com>
Date:   Wed Dec 25 20:37:25 2013 +0200

    make Android double-click issue threshold smaller, close #2303
---
 src/dom/DomEvent.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/dom/DomEvent.js b/src/dom/DomEvent.js
index 950077d..6a70d95 100644
--- a/src/dom/DomEvent.js
+++ b/src/dom/DomEvent.js
@@ -219,12 +219,12 @@ L.DomEvent = {
 		var timeStamp = (e.timeStamp || e.originalEvent.timeStamp),
 			elapsed = L.DomEvent._lastClick && (timeStamp - L.DomEvent._lastClick);
 
-		// are they closer together than 1000ms yet more than 100ms?
+		// are they closer together than 500ms yet more than 100ms?
 		// Android typically triggers them ~300ms apart while multiple listeners
 		// on the same event should be triggered far faster;
 		// or check if click is simulated on the element, and if it is, reject any non-simulated events
 
-		if ((elapsed && elapsed > 100 && elapsed < 1000) || (e.target._simulatedClick && !e._simulated)) {
+		if ((elapsed && elapsed > 100 && elapsed < 500) || (e.target._simulatedClick && !e._simulated)) {
 			L.DomEvent.stop(e);
 			return;
 		}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet.git



More information about the Pkg-javascript-commits mailing list