From ac93b62d919ba13d13ec3f5f2189776093483e53 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Thu, 17 Jul 2014 10:21:48 +0200 Subject: [PATCH] Bugfix. Android ready. --- skins/photo_film_viewer.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/skins/photo_film_viewer.js b/skins/photo_film_viewer.js index 7561e24..1ad17ce 100644 --- a/skins/photo_film_viewer.js +++ b/skins/photo_film_viewer.js @@ -613,17 +613,20 @@ else if (browser.isIE6up) { FilmSlider.prototype.touchStartHandler = function(evt) { this.filmStartX = parseInt(this.film.style.left, 10); - this.touchStartX = evt.pageX; + this.touchStartX = evt.changedTouches[0].screenX; }; FilmSlider.prototype.touchMoveHandler = function(evt) { disableDefault(evt); - var delta = this.touchStartX - evt.pageX; + var delta = this.touchStartX - evt.changedTouches[0].screenX; var posX = this.filmStartX - delta; this.setFilmPosition(posX); }; FilmSlider.prototype.touchEndHandler = function(evt) { + if (evt.changedTouches[0].screenX !== this.touchStartX) { + disableDefault(evt); + } this.touchStartX = undefined; }; -- 2.20.1