Commit 82fbaaf3 authored by Hakim El Hattab's avatar Hakim El Hattab
Browse files

fixed issue with links on touch devices (tap wasn't working)

No related merge requests found
Showing with 6 additions and 2 deletions
+6 -2
...@@ -104,9 +104,13 @@ var Slideshow = (function(){ ...@@ -104,9 +104,13 @@ var Slideshow = (function(){
* @param {Object} event * @param {Object} event
*/ */
function onDocumentTouchStart( event ) { function onDocumentTouchStart( event ) {
// We're only interested in one point taps // 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(); event.preventDefault();
var point = { var point = {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment