From 182f8e891afce8318f696ca92cbc5d5200e86803 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sun, 29 Jul 2012 17:27:47 -0700 Subject: [PATCH] Ignore absolute touch events if more than one touch. --- guacamole-common-js/src/main/resources/mouse.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/guacamole-common-js/src/main/resources/mouse.js b/guacamole-common-js/src/main/resources/mouse.js index bf2c6d5f4..d23c8f7b2 100644 --- a/guacamole-common-js/src/main/resources/mouse.js +++ b/guacamole-common-js/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();