Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.swiper-pagination-vertical class is not removed when changing direction via breakpoints #6511

Closed
5 of 6 tasks
benwallis opened this issue Mar 21, 2023 · 0 comments
Closed
5 of 6 tasks

Comments

@benwallis
Copy link

benwallis commented Mar 21, 2023

Check that this is really a bug

  • I confirm

Reproduction link

https://4pqz1b-5000.csb.app/

Bug description

When changing direction from vertical to horizontal via breakpoint, the ".swiper-pagination-vertical" class is not removed resulting in the pagination/navigation elements being in the wrong place/orientation.

    var swiper = new Swiper(".mySwiper", {
      direction: "horizontal",
      slidesPerView: 1,
      spaceBetween: 10,
      pagination: {
        el: ".swiper-pagination",
        clickable: true,
        enabled: true,
      },
      breakpoints: {
        992: {
            direction: "vertical",
            slidesPerView: 5,
            navigation: {
                enabled: false
            },
            pagination: {
                enabled: false
            }
        }
    }
    });

Expected Behavior

The pagination bullets should not be displayed vertically when the swiper direction is "horizontal".

Actual Behavior

The pagination bullets are displayed vertically when the swiper direction is "horizontal".

Swiper version

9.1.1

Platform/Target and Browser Versions

macOS, Windows, iOS, Android - Chrome, Firefox, Safari, Edge (latest versions))

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant