[Pkg-javascript-commits] [leaflet] 82/301: MsTouch needs preventDefault. Fixes #2000

Jonas Smedegaard js at moszumanska.debian.org
Mon Jan 27 22:22:43 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 dbced20543af251d0a87089e0bcef5e12c625fa0
Author: danzel <danzel at localhost.geek.nz>
Date:   Thu Aug 29 09:22:27 2013 +1200

    MsTouch needs preventDefault. Fixes #2000
---
 src/dom/DomEvent.MsTouch.js | 2 ++
 src/dom/Draggable.js        | 3 +--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/dom/DomEvent.MsTouch.js b/src/dom/DomEvent.MsTouch.js
index 685baaa..ed5dd70 100644
--- a/src/dom/DomEvent.MsTouch.js
+++ b/src/dom/DomEvent.MsTouch.js
@@ -30,6 +30,8 @@ L.extend(L.DomEvent, {
 
 		var cb = function (e) {
 
+			L.DomEvent.preventDefault(e);
+
 			var alreadyInArray = false;
 			for (var i = 0; i < touches.length; i++) {
 				if (touches[i].pointerId === e.pointerId) {
diff --git a/src/dom/Draggable.js b/src/dom/Draggable.js
index 48bb6cb..4597646 100644
--- a/src/dom/Draggable.js
+++ b/src/dom/Draggable.js
@@ -50,8 +50,7 @@ L.Draggable = L.Class.extend({
 
 		if (e.shiftKey || ((e.which !== 1) && (e.button !== 1) && !e.touches)) { return; }
 
-		L.DomEvent
-			.stopPropagation(e);
+		L.DomEvent.stopPropagation(e);
 
 		if (L.Draggable._disabled) { 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