swiper icon indicating copy to clipboard operation
swiper copied to clipboard

Fade effect does not work with virtual slides. Strange behavior.

Open barrakuda099 opened this issue 1 year ago • 2 comments

Check that this is really a bug

  • [X] I confirm

Reproduction link

https://codesandbox.io/p/devbox/swiper-vue-effect-fade-forked-tclghq

Bug description

Fade effect does not work correctly with virtual slides. Several problems:

  1. Open link and try to go next slide a couple of times. You will see following:
  • First click on next slide button (slide occurs with transition effect)
  • Second click on next slide button (slide occurs immediately without transition and after that transition occurs for next slide)
  1. In case swiper has "loop" flag, second slide does not shown at all (white screen). To reproduce you need to go click next slide button until slide is not visible (on the second circle you will see that slide 2 is empty) image

Expected Behavior

No response

Actual Behavior

No response

Swiper version

11.1.12

Platform/Target and Browser Versions

Chrome

Validations

  • [X] Follow our Code of Conduct
  • [X] Read the docs.
  • [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • [X] Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • [ ] I'm willing to open a PR

barrakuda099 avatar Sep 10 '24 13:09 barrakuda099

t0ggles-create swiper

nolimits4web avatar Sep 12 '24 15:09 nolimits4web

Task nolimits4web/SWIPER-151 was created

t0ggles task SWIPER-151

t0ggles[bot] avatar Sep 12 '24 15:09 t0ggles[bot]

try: import 'swiper/css/effect-fade'

deep-project avatar Jan 13 '25 05:01 deep-project

I have a similar issue - the fade effect technically works with the virtual slides by having imported the import 'swiper/css/effect-fade' CSS when you go from one slide to another in their normal order.

However, I have a slider bullet-based navigation that can scroll the slider to a slide outside the number of preloaded virtual slides, which in turn causes a jump in the animation rather than a smooth fade-in-out.

It would be great if newly added/updated virtual slides would fade in as well.

rmykolas avatar Jan 30 '25 09:01 rmykolas

Task nolimits4web/SWIPER-151 status changed to Done

t0ggles[bot] avatar May 19 '25 22:05 t0ggles[bot]