Merge pull request #372 from Gitgiddy/master
fixes type error surrounding `event.targetTouches`
This commit is contained in:
@@ -79,7 +79,7 @@ KeyboardInputManager.prototype.listen = function () {
|
||||
|
||||
gameContainer.addEventListener(this.eventTouchstart, function (event) {
|
||||
if ((!window.navigator.msPointerEnabled && event.touches.length > 1) ||
|
||||
event.targetTouches > 1) {
|
||||
event.targetTouches.length > 1) {
|
||||
return; // Ignore if touching with more than 1 finger
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ KeyboardInputManager.prototype.listen = function () {
|
||||
|
||||
gameContainer.addEventListener(this.eventTouchend, function (event) {
|
||||
if ((!window.navigator.msPointerEnabled && event.touches.length > 0) ||
|
||||
event.targetTouches > 0) {
|
||||
event.targetTouches.length > 0) {
|
||||
return; // Ignore if still touching with one or more fingers
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user