From: Hakim El Hattab Date: Thu, 23 Jun 2011 07:05:53 +0000 (+0200) Subject: fixed issue with links on touch devices (tap wasn't working) X-Git-Tag: 0.3.0~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=82fbaaf332e93c3def8ad8e1cfb4ceff9cd0c939;p=reveal.js.git fixed issue with links on touch devices (tap wasn't working) --- 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 = {