I am using latest release in everything and I have a big problem with swiper and in my case my slides of stores are clickable with a click/tap but I want to prevent click/tap when swiping to the next slide…
The Issue: the click/tap is activated when swiping to the next slide!
is there a way to avoid this behaviour?
I am using the options below without any luck:
preventClicks: true,
preventClicksPropagation: true,
my code:
var swiper = $f7.swiper.create(
'.swiper-container.stores', {
lazy: {
threshold: 50,
loadPrevNext: true,
loadPrevNextAmount: 2,
},
preventClicks: true,
preventClicksPropagation: true,
centeredSlides: false,
watchSlidesVisibility: true,
observer: true,
loop: false,
initialSlide: 0,
preloadImages: false,
lazy: true,
slidesPerView: 'auto',
spaceBetween: 5,
pagination: {
el: '.swiper-pagination',
dynamicBullets: false,
},
scrollbar: {
el: '.swiper-scrollbar',
hide: true,
},
on: {
init: function () {
},
tap: function (swiper, e) {
if ($(e.target).closest(".swiper-slide").attr('data-id')) {
var store_id = $(e.target).closest(".swiper-slide").attr('data-id');
setTimeout(function () {
$f7.views.main.router.navigate('/store/' + store_id + '/');
}, 10);
}
},
},
});
Appreciate any tip to solve this issue with latest swiper!
In swiper version 3 it seems to be working perfectly click when click and when swiping click is not propagated!
How can I make this work with version 6 or it is a bug?
thanks