question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Swiper is not looping correctly

See original GitHub issue

Vue.js version and component version

2.5.17

Nuxt version

2.0.0-25550715.56db988

Reproduction Link

https://github.com/AndrewBogdanovTSS/nuxt2-awesome-swiper

Steps to reproduce

  • Specify swiper options as stated below
  • Set div.swiper-slide style width to auto to wrap to a size of the provided image

Swiper settings config object

swiperOptions: {
                    pagination: {
                        el: '.swiper-pagination',
                        clickable: true
                    },
                    navigation: {
                        nextEl: '.swiper-button-next',
                        prevEl: '.swiper-button-prev'
                    },
                    loop: true,
                    slidesPerView: 'auto',
                    loopedSlides: 10
                }

What is Expected?

Swiper is looping indefinitely in both directions

What is actually happening?

Swiper is looping indefinitely only backwards

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:4
  • Comments:21

github_iconTop GitHub Comments

7reactions
dw72commented, Jan 13, 2019
6reactions
achimoraitescommented, May 7, 2019

these settings worked for me 👍

      swiperOption: {
	slidesPerView: 1,
	autoplay: { delay: 2000 },
         spaceBetween: 30,
        loop: true,
        navigation: {
          nextEl: ".swiper-button-next",
          prevEl: ".swiper-button-prev"
        }
      }

It seems that by adding autoplay the slider works as expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Swiper slider not working as expected with loop: true and ...
Swiper slider is not working properly with loop set to true and centeredSlides set to false. When a thumbnail or a navigation arrow...
Read more >
Swiper Loop Bug - CodePen
Insecure Resource. The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https....
Read more >
Swiper Changelog
Fixed issue with not working correctly touchReleaseOnEdges on iOS; Fixed issue with not working allowSlideNext/Prev change on Breakpoints ...
Read more >
Swiper Demo 20 Loop Mode Infinite Loop - StackBlitz
<link rel="stylesheet" href="https://unpkg. com/swiper/swiper-bundle.min.css">. </head>. <body>. <!-- Swiper -->. <div class="swiper-container">.
Read more >
Swiper doesn't work properly (cannot swipe) - Questions
Hi there, I'm having trouble with a dynamic swiper slider I've created. ... data-slides-per-view="auto" data-loop="true" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found