forked from blallo/talk-hm-0x15
fixed issue with links on touch devices (tap wasn't working)
This commit is contained in:
parent
faecabd568
commit
82fbaaf332
1 changed files with 6 additions and 2 deletions
|
@ -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 = {
|
||||||
|
|
Loading…
Reference in a new issue