Browse Source

Only init swiping when eventName is 'touchend'

Tobias Reich 8 years ago
parent
commit
cb88c90cbd
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/scripts/init.js

+ 2 - 2
src/scripts/init.js

@@ -76,13 +76,13 @@ $(document).ready(function() {
 	});
 
 
-	if ('ontouchend' in document.documentElement) {
+	if (eventName==='touchend') {
 
 		$(document)
 
 			/* Fullscreen on mobile */
 			.on('touchend', '#image', function(e) {
-				if (swipe.obj===null||(swipe.offset>=-5&&swipe.offset<=5)) {
+				if (swipe.obj==null||(swipe.offset>=-5&&swipe.offset<=5)) {
 					if (visible.header())	header.hide(e, 0);
 					else					header.show();
 				}