Merge pull request #2121 from ronnymikalsen/fix/2117-contacts-points-in-mousetracker

fix: contacts points on touch devices
This commit is contained in:
Ian Gilman 2022-03-15 14:49:51 -07:00 committed by GitHub
commit 7e64d28197
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1403,7 +1403,6 @@
--this.contacts;
if (this.contacts < 0) {
$.console.warn('GesturePointList.removeContact() Implausible contacts value');
this.contacts = 0;
}
}
@ -2823,10 +2822,7 @@
// If child element relinquishes capture to a parent we may get here
// from a pointerleave event while a pointerup event will never be received.
// In that case, we'll clean up the contact count
if ( (pointsList.type === 'mouse' || pointsList.type === 'pen') &&
pointsList.contacts > 0 ) {
pointsList.removeContact();
}
pointsList.removeContact();
listLength = pointsList.removeById( gPoint.id );
} else {