From dab3cd5c03f9549343be4f9c299fb76606472d16 Mon Sep 17 00:00:00 2001 From: Malini Das Date: Tue, 4 Jun 2013 13:47:53 -0400 Subject: [PATCH] Bug 878910 - fix touchlists for 'touchend' and 'touchcancel', r=jgriffin --- testing/marionette/marionette-listener.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/marionette/marionette-listener.js b/testing/marionette/marionette-listener.js index 9b1852e2040d..310c504bfe55 100644 --- a/testing/marionette/marionette-listener.js +++ b/testing/marionette/marionette-listener.js @@ -894,11 +894,11 @@ function emitMultiEvents(type, touch, touches) { let win = doc.defaultView; // touches that are in the same document let documentTouches = doc.createTouchList(touches.filter(function(t) { - return t.target.ownerDocument === doc; + return ((t.target.ownerDocument === doc) && (type != 'touchcancel')); })); // touches on the same target let targetTouches = doc.createTouchList(touches.filter(function(t) { - return t.target === target; + return ((t.target === target) && ((type != 'touchcancel') || (type != 'touchend'))); })); // Create changed touches let changedTouches = doc.createTouchList(touch);