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

glider-slide-visible doesn't fire when scrolling when slidesToShow === 1 #224

Open
kevinfarrugia opened this issue Feb 28, 2022 · 0 comments

Comments

@kevinfarrugia
Copy link
Contributor

glider-slide-visible fires whenever a slide is visible in the glider. This works correctly in most cases, however when the slidesToShow is set to 1, the event doesn't fire when scrolling (using a touchpad or touch device) while it fires when using the dots or arrows.

Reproducible Example
https://codesandbox.io/s/glider-js-glider-slide-visible-mlb6w2

Code

new Glider(document.getElementById("glider-1"), {
      slidesToShow: 1,
      dots: ".dots",
      draggable: true,
      arrows: {
        prev: "#glider-prev-1",
        next: "#glider-next-1"
      }
    });

    document
      .getElementById("glider-1")
      .addEventListener("glider-slide-visible", () => {
        console.log("slide-visible");
      });

Expected Outcome
It is expected that glider-slide-visible would fire similarly to when slidesToShow !== 1.

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