Skip to content

swiper-slide-visible class in controlled slider #6498

Closed
@kosh89

Description

@kosh89

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/sandbox/swiper-watch-slides-visibility-forked-qrjoj5?file=%2Findex.html&selection=%5B%7B%22endColumn%22%3A42%2C%22endLineNumber%22%3A118%2C%22startColumn%22%3A42%2C%22startLineNumber%22%3A118%7D%5D

Bug description

We have two linked sliders with { slidesPerView: 3, watchSlidesProgress: true }
Click on slide removes first slides in both sliders;
And it's ok if sliders have more than three slides, but if slides count less or equal 3, than slides in one of sliders miss "swiper-slide-visible" class.
In my example slides without visible class have opacity: 0;

Expected Behavior

All slides in viewport have swiper-slide-visible class

Actual Behavior

Slides of one of slider missing swiper-slide-visible class

Swiper version

8.4.5

Platform/Target and Browser Versions

Windows 10, Chrome 111.0.5563.65

Validations

  • Follow our Code of Conduct
    Read the docs.
    Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
    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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @nolimits4web@kosh89

        Issue actions

          swiper-slide-visible class in controlled slider · Issue #6498 · nolimits4web/swiper