Browse Source

Improved touchend support check #345

Tobias Reich 8 years ago
parent
commit
024e015b9b
2 changed files with 2 additions and 1 deletions
  1. 0 0
      dist/main.js
  2. 2 1
      src/scripts/init.js

File diff suppressed because it is too large
+ 0 - 0
dist/main.js


+ 2 - 1
src/scripts/init.js

@@ -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;

Some files were not shown because too many files changed in this diff