From 4e8cb2f1a73821663c62c94966b94b101a99b07f Mon Sep 17 00:00:00 2001 From: Lewis Hemens Date: Sun, 12 Jan 2014 17:19:15 +0000 Subject: [PATCH] Temporary fix for touchend bug on mobile --- js-lib/controller.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js-lib/controller.js b/js-lib/controller.js index cfc8717..b1562dc 100644 --- a/js-lib/controller.js +++ b/js-lib/controller.js @@ -143,9 +143,9 @@ ascii.Controller.prototype.installTouchBindings = function() { }); $(this.view.canvas).bind('touchend', function(e) { e.preventDefault(); - controller.handleRelease(new ascii.Vector( - e.originalEvent.touches[0].pageX, - e.originalEvent.touches[0].pageY)); + // TODO: This works for now as we don't use a touchend position anywhere. + // Need to track last position from touchmove and use it here. + controller.handleRelease(new ascii.Vector(0, 0)); }); $(this.view.canvas).bind('touchmove', function(e) { e.preventDefault();