Bug 878910 - fix touchlists for 'touchend' and 'touchcancel', r=jgriffin

This commit is contained in:
Malini Das 2013-06-04 13:47:53 -04:00
Родитель 9b232e7840
Коммит dab3cd5c03
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -894,11 +894,11 @@ function emitMultiEvents(type, touch, touches) {
let win = doc.defaultView; let win = doc.defaultView;
// touches that are in the same document // touches that are in the same document
let documentTouches = doc.createTouchList(touches.filter(function(t) { 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 // touches on the same target
let targetTouches = doc.createTouchList(touches.filter(function(t) { let targetTouches = doc.createTouchList(touches.filter(function(t) {
return t.target === target; return ((t.target === target) && ((type != 'touchcancel') || (type != 'touchend')));
})); }));
// Create changed touches // Create changed touches
let changedTouches = doc.createTouchList(touch); let changedTouches = doc.createTouchList(touch);