swiper icon indicating copy to clipboard operation
swiper copied to clipboard

swiper thumbs work differently depending on direction swiped.

Open learyjk opened this issue 9 months ago • 0 comments

Check that this is really a bug

  • [X] I confirm

Reproduction link

https://codesandbox.io/p/sandbox/swiper-thumbs-gallery-forked-fm58z8

Bug description

When advancing the slider, thumbs update the entire view. When going in reverse, thumbs update one-at-a-time.

Is this by design?

It seems to cause issues when using autoScrollOffset not equal to 0 as well.

in the example, with autoScrollOffset set to 1, the "active" thumbnail lags by 1 when the thumbnail view is shifted when advancing the slider forward. Works great in reverse though!

Expected Behavior

I would expect forward/reverse direction to influence thumbnail in the same manner. I think how the thumbnails respond when swiping in the reverse (not forward) direction makes sense for the default behavior.

Actual Behavior

see description.

Swiper version

11.1.3

Platform/Target and Browser Versions

Chrome 125

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?

  • [X] I'm willing to open a PR

learyjk avatar May 23 '24 22:05 learyjk