How to prevent swiping on certain are of the slide using swiperjs

We are using swiperjs for slide. It is working great but we have input inside the slide and it is very hard to fill up the input if users can actually swipe on those. Im wondering if there is a way to prevent the slider sliding if user touchstart on an input.

This is how we init the slider:

new Swiper('.slider', {
  resistance: true,
  resistanceRatio: 25,
});

The HTML inside the slides includes

<input type="text">
<input type='range' min='0' max='11'>

39 thoughts on “How to prevent swiping on certain are of the slide using swiperjs”

Leave a Comment