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

lazyPreloadPrevNext not working with grid mode and fill:"row" enabled #6725

Closed
6 tasks done
rameauv opened this issue Jun 4, 2023 · 0 comments
Closed
6 tasks done

Comments

@rameauv
Copy link
Contributor

rameauv commented Jun 4, 2023

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/sandbox/swiper-lazy-load-images-forked-v6nxf9?file=%2Findex.html%3A128%2C11

Bug description

Preconditions:

Initial slide at index 0
lazyPreloadPrevNext > 0

grid: {
    rows: > 1,
    fill: "row"
}

LazyPreloadPrevNext is preloading slides as if there where contiguous instead of taking in account the grid layout.

Expected Behavior

It should remove loading=lazy from the correct slides.

Actual Behavior

It remove loading=lazy removed from the wrong slides (contiguous slides).

Swiper version

9.3.2

Platform/Target and Browser Versions

macOS 13.0.1 (22A400) intel, chrome 113.0.5672.77 (Official Build) (x86_x64)

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