Browse Source

Update jquery.mobile-events.js to latest version.

pull/62/head
Evan Theurer 11 years ago
parent
commit
10b7e654c5
  1. 12
      static/js/libs/jquery/jquery.mobile-events.js

12
static/js/libs/jquery/jquery.mobile-events.js

@ -33,7 +33,7 @@
// purports support for touch events even if the underlying hardware // purports support for touch events even if the underlying hardware
// does not! // does not!
var agent = navigator.userAgent.toLowerCase(), 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 = { settings = {
tap_pixel_range: 5, tap_pixel_range: 5,
@ -267,7 +267,7 @@
$this.on(settings.startevent, function (e) { $this.on(settings.startevent, function (e) {
if (e.which && e.which !== 1) { if (e.which && e.which !== 1) {
return false; return false;
} else { } else if(!$this.data('lastTouch')) {
$this.data('doubletapped', false); $this.data('doubletapped', false);
origTarget = e.target; origTarget = e.target;
$this.data('callee1', arguments.callee); $this.data('callee1', arguments.callee);
@ -302,12 +302,12 @@
// Now get the current event: // Now get the current event:
var lastTap = { var lastTap = {
'position': { 'position': {
'x': (settings.touch_capable) ? origEvent.touches[0].screenX : e.screenX, 'x': (settings.touch_capable) ? e.originalEvent.changedTouches[0].screenX : e.screenX,
'y': (settings.touch_capable) ? origEvent.touches[0].screenY : e.screenY 'y': (settings.touch_capable) ? e.originalEvent.changedTouches[0].screenY : e.screenY
}, },
'offset': { 'offset': {
'x': (settings.touch_capable) ? origEvent.touches[0].pageX - origEvent.touches[0].target.offsetLeft : e.offsetX, 'x': (settings.touch_capable) ? e.originalEvent.changedTouches[0].pageX - e.originalEvent.changedTouches[0].target.offsetLeft : e.offsetX,
'y': (settings.touch_capable) ? origEvent.touches[0].pageY - origEvent.touches[0].target.offsetTop : e.offsetY 'y': (settings.touch_capable) ? e.originalEvent.changedTouches[0].pageY - e.originalEvent.changedTouches[0].target.offsetTop : e.offsetY
}, },
'time': new Date().getTime(), 'time': new Date().getTime(),
'target': e.target 'target': e.target

Loading…
Cancel
Save