aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2011-06-23 09:05:53 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2011-06-23 09:05:53 +0200
commit82fbaaf332e93c3def8ad8e1cfb4ceff9cd0c939 (patch)
tree1e93849106f822479be1d5b26bcbcf20d450eab0
parentfaecabd568946dba80c9b9e3ede05cf66adf634a (diff)
downloadfosdem-2018-presentation-82fbaaf332e93c3def8ad8e1cfb4ceff9cd0c939.tar
fosdem-2018-presentation-82fbaaf332e93c3def8ad8e1cfb4ceff9cd0c939.tar.gz
fixed issue with links on touch devices (tap wasn't working)
-rw-r--r--js/slideshow.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/js/slideshow.js b/js/slideshow.js
index 8165a40..bd6ae28 100644
--- a/js/slideshow.js
+++ b/js/slideshow.js
@@ -104,9 +104,13 @@ var Slideshow = (function(){
* @param {Object} event
*/
function onDocumentTouchStart( event ) {
-
// We're only interested in one point taps
- if (event.touches.length == 1) {
+ if (event.touches.length === 1) {
+ // Never prevent taps on anchors and images
+ if( event.target.tagName.toLowerCase() === 'a' || event.target.tagName.toLowerCase() === 'img' ) {
+ return;
+ }
+
event.preventDefault();
var point = {