From 10b7e654c5ec48d8668d1a56a8de038a1cd5fc8e Mon Sep 17 00:00:00 2001 From: Evan Theurer Date: Wed, 2 Jul 2014 16:17:16 +0200 Subject: [PATCH] Update jquery.mobile-events.js to latest version. --- static/js/libs/jquery/jquery.mobile-events.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/static/js/libs/jquery/jquery.mobile-events.js b/static/js/libs/jquery/jquery.mobile-events.js index f4be18e4..9b6026e4 100644 --- a/static/js/libs/jquery/jquery.mobile-events.js +++ b/static/js/libs/jquery/jquery.mobile-events.js @@ -33,7 +33,7 @@ // purports support for touch events even if the underlying hardware // does not! var agent = navigator.userAgent.toLowerCase(), - isChromeDesktop = (agent.indexOf('chrome') > -1 && ((agent.indexOf('windows') > -1) || (agent.indexOf('macintosh') > -1) || (agent.indexOf('linux') > -1)) && agent.indexOf('mobile') < 0), + isChromeDesktop = (agent.indexOf('chrome') > -1 && ((agent.indexOf('windows') > -1) || (agent.indexOf('macintosh') > -1) || (agent.indexOf('linux') > -1)) && agent.indexOf('mobile') < 0 && agent.indexOf('nexus') < 0), settings = { tap_pixel_range: 5, @@ -267,7 +267,7 @@ $this.on(settings.startevent, function (e) { if (e.which && e.which !== 1) { return false; - } else { + } else if(!$this.data('lastTouch')) { $this.data('doubletapped', false); origTarget = e.target; $this.data('callee1', arguments.callee); @@ -302,12 +302,12 @@ // Now get the current event: var lastTap = { 'position': { - 'x': (settings.touch_capable) ? origEvent.touches[0].screenX : e.screenX, - 'y': (settings.touch_capable) ? origEvent.touches[0].screenY : e.screenY + 'x': (settings.touch_capable) ? e.originalEvent.changedTouches[0].screenX : e.screenX, + 'y': (settings.touch_capable) ? e.originalEvent.changedTouches[0].screenY : e.screenY }, 'offset': { - 'x': (settings.touch_capable) ? origEvent.touches[0].pageX - origEvent.touches[0].target.offsetLeft : e.offsetX, - 'y': (settings.touch_capable) ? origEvent.touches[0].pageY - origEvent.touches[0].target.offsetTop : e.offsetY + 'x': (settings.touch_capable) ? e.originalEvent.changedTouches[0].pageX - e.originalEvent.changedTouches[0].target.offsetLeft : e.offsetX, + 'y': (settings.touch_capable) ? e.originalEvent.changedTouches[0].pageY - e.originalEvent.changedTouches[0].target.offsetTop : e.offsetY }, 'time': new Date().getTime(), 'target': e.target