Improved touchend support check #345

This commit is contained in:
Tobias Reich 2015-06-27 21:48:11 +02:00
parent 160b9d3ba4
commit 024e015b9b
2 changed files with 2 additions and 1 deletions

BIN
dist/main.js vendored

Binary file not shown.

View File

@ -6,7 +6,8 @@
$(document).ready(function() {
/* Event Name */
var eventName = ('ontouchend' in document.documentElement) ? 'touchend' : 'click';
var touchendSupport = (/Android|iPhone|iPad|iPod/i).test(navigator.userAgent || navigator.vendor || window.opera) && ('ontouchend' in document.documentElement),
eventName = (touchendSupport===true ? 'touchend' : 'click');
/* Set API error handler */
api.onError = lychee.error;