Not setting the right translate values after a couple of slides #6846
Unanswered
jcsdesterke
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Check that this is really a bug
Reproduction link
https://codepen.io/jandesterke/pen/ExOobBm
Bug description
I have slides that can be clicked in order to expand.
This means the width of the slides can change.
It seems that Swiper JS is having trouble with that, which results in unexpected behavior.
The first slides work fine when calling the 'slideTo' function on click, but the 3/4/5 slides are causing trouble.
Swiper then stops with sliding to the correct position.
In the codepen it can be seen clearly, but in my own dev environment it is about a few pixels which causes the difference to progressively grow. (https://gyazo.com/f3c56b53502d5a638843d128fa0fa477)
Expected Behavior
Slide to the current position and setting the right translate value for the swiper wrapper.
Actual Behavior
Setting incorrect values which causes wrong positions.
Swiper version
10.0.4
Platform/Target and Browser Versions
macOS, Chrome
Validations
Would you like to open a PR for this bug?
Beta Was this translation helpful? Give feedback.
All reactions