From: Michael Jumper Date: Mon, 30 Jul 2012 00:27:47 +0000 (-0700) Subject: Ignore absolute touch events if more than one touch. X-Git-Url: http://git.alex.org.uk Ignore absolute touch events if more than one touch. --- diff --git a/src/main/resources/mouse.js b/src/main/resources/mouse.js index bf2c6d5..d23c8f7 100644 --- a/src/main/resources/mouse.js +++ b/src/main/resources/mouse.js @@ -670,6 +670,10 @@ Guacamole.Mouse.Touchscreen = function(element) { element.addEventListener("touchend", function(e) { + // Ignore if more than one touch + if (e.touches.length + e.changedTouches.length != 1) + return; + e.stopPropagation(); e.preventDefault(); @@ -684,6 +688,10 @@ Guacamole.Mouse.Touchscreen = function(element) { element.addEventListener("touchstart", function(e) { + // Ignore if more than one touch + if (e.touches.length != 1) + return; + e.stopPropagation(); e.preventDefault(); @@ -704,6 +712,10 @@ Guacamole.Mouse.Touchscreen = function(element) { element.addEventListener("touchmove", function(e) { + // Ignore if more than one touch + if (e.touches.length != 1) + return; + e.stopPropagation(); e.preventDefault();