You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Platform/Target and Browser Versions: macOS, Chrome 91.0.4472.101
What You Did
I created a Swiper slider with virtual slides & Parallax transition enabled.
Now when using swiper.slideNext() or swiper.slidePrev() to go to the next/previous slide, the parallax animation sometimes (in fact, most of the time) does not work correctly. Instead of animating both the "outgoing" and the "incoming" slide, it only animates the outgoing slide.
The issue occurs only the first time the rendered slide is animated to. E.g. if I transition to the 2nd slide the first time, the animation is broken. If I then transition back to the 1st slide (which was previously rendered), the animation works correctly.
I would expect that the parallax animation works regardless of which slide the transition is animating to, and regardless of whether virtual slides are used or not.
Actual Behavior
To better illustrate, I made a screen recording of the code example (see above) showing the issue.
Some slides are animated correctly (both slides have a parallax animation), but on other slides, only one of the slides is animated. It seems like the issue manly occurs when a slide is first added to the dom and has not yet been animated to/from. If the slide has already been once animated to/from (and in the meantime was not removed from the DOM again due to the "virtual slides" features), the animation is performed correctly.
The text was updated successfully, but these errors were encountered:
What You Did
I created a Swiper slider with virtual slides & Parallax transition enabled.
Now when using
swiper.slideNext()
orswiper.slidePrev()
to go to the next/previous slide, the parallax animation sometimes (in fact, most of the time) does not work correctly. Instead of animating both the "outgoing" and the "incoming" slide, it only animates the outgoing slide.The issue occurs only the first time the rendered slide is animated to. E.g. if I transition to the 2nd slide the first time, the animation is broken. If I then transition back to the 1st slide (which was previously rendered), the animation works correctly.
https://codesandbox.io/s/floral-darkness-nqdqr?file=/src/App.js
Expected Behavior
I would expect that the parallax animation works regardless of which slide the transition is animating to, and regardless of whether virtual slides are used or not.
Actual Behavior
To better illustrate, I made a screen recording of the code example (see above) showing the issue.
screen-recording-2021-06-13-at-214625_DROatQFL_pNKY.mp4
Some slides are animated correctly (both slides have a parallax animation), but on other slides, only one of the slides is animated. It seems like the issue manly occurs when a slide is first added to the dom and has not yet been animated to/from. If the slide has already been once animated to/from (and in the meantime was not removed from the DOM again due to the "virtual slides" features), the animation is performed correctly.
The text was updated successfully, but these errors were encountered: