Closed pneumotube closed 2 years ago
This is due to a bug with double slider initialization on the configuration page and a problem with the dragging also running when using the navigation arrows. I fixed that: https://github.com/dynamicweb/swiffy-slider/commit/c2753596f5b7a293b182719ef369bf706050499e
I believe that fixes the issue. Let me know if you see the same.
Thanks! Applied changes to swiffy-slider-extensions.min.js from https://github.com/dynamicweb/swiffy-slider/commit/c2753596f5b7a293b182719ef369bf706050499e.
Now both sliders reach the last slide and stop (the ''slider-nav-noloop" is not set). But they switch from the first slide to the last by clicking the left arrow.
I just do something wrong for sure :)
Can you please take a sneak peek at my setup below?
swiffy-slider styles are inlined in <head>
plus there's additional css to adjust to page design:
.swiffy-slider{max-width:80%}.slider-container{text-align:center}@media screen and (max-width:1200px){.swiffy-slider{max-width:100%}}
I have two sliders with different sets of pictures but with the same markup:
<div class="swiffy-slider .... slider-nav-mousedrag">
<div class="slider-container">
<div>
<img src="" width="" height="" decoding="async">
</div>
...
<div>
<img src="" width="" height="" decoding="async" loading="lazy">
</div>
</div>
<div type="button" class="slider-nav"></div>
<div type="button" class="slider-nav slider-nav-next"></div>
<div class="slider-indicators">
<div class="active"></div>
...
<div></div>
</div>
</div>
And <script src="/js/swiffyslider.js" defer></script>
below where swiffy-slider.min.js and swiffy-slider-extensions.min.js are combined.
Cannot tell without seeing the entire page - looks right. If you can repo on the config page, I can have a look - otherwise you have to debug yourself :-).
Could it be related to slider's double initiation? I'm not a developer, so I apologize for being annoying. 🙂
The console says:
Yes, that would be an issue. The js init it self, so maybe you also do it manually causing double load?
It works in FF though (jumps from the last to the first slide).
I don't init manually, maybe that's because I use swiffyslider.js and swiffysliderextensions.js both? I see initSlider(e)
in the code of these two.
It's not related to the two scripts and not related to the two sliders on page. Keep testing.
Managed to reproduce this issue. In Chromium based browsers on my test page there is no loop if there are 4 or 5 pictures in the slider. And loop works with 3 pictures slider.
Could you please take a look https://pneumotube.github.io/slider/
Quick test under macos: Chrome, Safari and Firefox (all probably latest-ish versions) give a thumbs up and loop and loop. In FF, I had an issue at first that the loops needed an extra invitation (one additional click on the right arrow at the last picture), but I couldn't reproduce. To me, it seems fine.
I'm on Windows, loop in two top sliders doesn't work in Chrome, Chrome Canary and Edge. Gonna check on other PCs though, if it's OK on Mac.
Im on my phone only today but it seems good. Could be browser zoom - never tested that. Could be that the content inside your slides are too wide for the slide container - could cause some math to not add up. You could check in the inspector
Thanks, yeah, it's something with my wrapper styles perhaps. Getting inconsistent results in different browsers. One of the sliders is stuck on oldish Chrome. I will dig into it.
Hi,
when "Mouse draggable" is set, the last slide switches to the first slide after repeated mouse click only. The first click on the right arrow makes the slide twitch a bit, and it switches only after the second click.
Tested on the latest FF, Chrome, and Chrome Canary.
You can check it on the first example from the Configurator with these settings.
Unfortunately, it isn't reproduced all the time on the configurator page, but I have this issue 100% of the time on my test page. I can email it to you if that's ok.