Answer the question
In order to leave comments, you need to log in
Links won't open on iPad. On a normal desktop everything is ok. Perhaps a problem with ontouchstart?
dev.thecultureofart.com/about
Links not working on main div. And on desktop everything is ok.
It looks like part of the code:
function _initCaleoMouseWheel() {
if ( $('.hijack-page').length > 0 ) {
// call initScrollHijack
if ( feature.touch && vpW >= 768 && (vpW >= 1051 || vpH >= 470) ) {
//console.log('activate swiping');
$('body').on('touchstart', '.side-draggable', false, _touchStartOvertake);
$('body').on('touchend', '.side-draggable', false, _touchEndOvertake);
} else {
window.addEventListener('mousewheel', scrollOvertake, false);
window.addEventListener('wheel', scrollOvertake, false);
}
} else {
if ( vpW < 768 || (vpW < 1050 && vpH < 470) ) {
window.removeEventListener('mousewheel', scrollOvertake, false);
window.removeEventListener('wheel', scrollOvertake, false);
}
$('body').off('touchstart', '.side-draggable', false, _touchStartOvertake);
$('body').off('touchend', '.side-draggable', false, _touchEndOvertake);
}
}
Answer the question
In order to leave comments, you need to log in
Understood.
The problem was in the touchstart event.
In the handler of this event (_touchStartOvertake), I set the click on the link to be processed as a link
// touched a link as first
if ( e.target.nodeName === 'A' ) {
clickedHref = e.target.href ;
document.location.href = clickedHref;
e.preventDefault();
return false;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question