From d725fc9275a1a82d2bb8dc91edd195db7a6925cd Mon Sep 17 00:00:00 2001 From: mister-ben Date: Mon, 15 Aug 2016 17:45:38 -0400 Subject: [PATCH] @mister-ben fixed android treating swipe as a tap. closes #3514 Conflicts: CHANGELOG.md --- src/js/component.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/js/component.js b/src/js/component.js index 9ef9d0caf3..31dfe0ba71 100644 --- a/src/js/component.js +++ b/src/js/component.js @@ -11,7 +11,6 @@ import * as Guid from './utils/guid.js'; import * as Events from './utils/events.js'; import log from './utils/log.js'; import toTitleCase from './utils/to-title-case.js'; -import assign from 'object.assign'; import mergeOptions from './utils/merge-options.js'; @@ -1176,8 +1175,11 @@ class Component { this.on('touchstart', function(event) { // If more than one finger, don't consider treating this as a click if (event.touches.length === 1) { - // Copy the touches object to prevent modifying the original - firstTouch = assign({}, event.touches[0]); + // Copy pageX/pageY from the object + firstTouch = { + pageX: event.touches[0].pageX, + pageY: event.touches[0].pageY + }; // Record start time so we can detect a tap vs. "touch and hold" touchStart = new Date().getTime(); // Reset couldBeTap tracking