From cb88c90cbda2e2f2976d8a431fd67804104caf28 Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Thu, 9 Jul 2015 15:21:19 +0200 Subject: [PATCH] Only init swiping when eventName is 'touchend' --- src/scripts/init.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/init.js b/src/scripts/init.js index 236cc6a..ff1155c 100755 --- a/src/scripts/init.js +++ b/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(); }