Skip to content

Commit

Permalink
fixed issue with links on touch devices (tap wasn't working)
Browse files Browse the repository at this point in the history
  • Loading branch information
hakimel committed Jun 23, 2011
1 parent faecabd commit 82fbaaf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions js/slideshow.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 82fbaaf

Please sign in to comment.