Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

189
Visualizações
In Swiper.js, why the carousel scrolls in a different direction when holding the space between slides?

I have a horizontal carousel.

It works fine when holding and swiping the slides, scrolling horizontally.

But when holding and swiping the space between slides, it scrolls vertically instead, which is wrong.

I am wondering how to solve that.

It seems that the spaces between the slides are considered outside the swiper, instead of a part of the swiper.

Here is my config for the swiper HTML element.

  private setSwiperConfig(): void {
    this.swiperConfig = {
      centeredSlides: false,
      spaceBetween: 24,
      slidesPerView: 'auto',
      grabCursor: true,
      allowTouchMove: true,
      shortSwipes: true,
      touchEventsTarget: 'wrapper',
      lazy: true,
      mousewheel: {
        forceToAxis: true
      },
      freeMode: true,
      speed: 500
    };
  }

Please help!

Thanks in advance!

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda