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

Virtual module not working correctly when paired with EffectCards module in React 18 using ReactDOM.createRoot #7277

Closed
5 of 6 tasks
jaredhill4 opened this issue Dec 26, 2023 · 0 comments
Labels

Comments

@jaredhill4
Copy link

jaredhill4 commented Dec 26, 2023

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/sandbox/swiperjs-virtual-bug-3qpc9l

Bug description

When using the Virtual module with the EffectCards and Navigation module in React 18 with ReactDOM.createRoot, there is a bug with the position and order of the slides.

When navigating forward, the cards move all the way to the right of the container, and when navigating backward, the cards move all the way to the left.

There is a little bit different behavior when using ReactDOM.render: Instead of all the cards moving over to the side of the container/viewport, they all slide back into the center from the left or right, depending on which way you are navigating.

Expected Behavior

We would expect a slider using the EffectCards module to behave the normally with the Virtual module enabled.

Actual Behavior

No response

Swiper version

11.0.5

Platform/Target and Browser Versions

macOS Safari, Chrome

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
Projects
None yet
Development

No branches or pull requests

1 participant