fix touch event twice bug (complements ac62dcce9d)

This commit is contained in:
wvengen 2013-06-20 01:20:13 +02:00
parent 1e984df3aa
commit 931b3bef5e

View file

@ -18,7 +18,7 @@ $.fn.extend({
var isTouchSupported = 'ontouchstart' in window || window.DocumentTouch && document instanceof DocumentTouch; var isTouchSupported = 'ontouchstart' in window || window.DocumentTouch && document instanceof DocumentTouch;
return function( types, selector, data, fn, one ) { return function( types, selector, data, fn, one ) {
if (typeof types == 'string' && isTouchSupported && !(types.match(/touch/gi))) types = types.replace(/click/gi, 'touchstart'); if (typeof types == 'string' && isTouchSupported && !(types.match(/touch/gi))) types = types.replace(/click/gi, 'touchstart');
return this._on( types, selector, data, fn); return this._on( types, selector, data, fn, one );
}; };
}()), }()),
}); });