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

Closing a modal changes active slide and breaks loop mode #7540

Comments

@mdmontesinos
Copy link

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/sandbox/swiper-element-boostrap-modal-x5535x

Bug description

I have a swiper that shows multiple slides per view, and when clicking the anchor inside the slide, a boostrap modal is triggered. However, when clicking a slide that is not the central one and closing the modal, the active slide is changed to the one that triggered the modal. Also, if it is the last one, loop mode completely breaks and no next slide is shown.

The boostrap modal is not inside the swiper-container.

Here's a demo video from the codesandbox I provided:

screen-capture.webm

Expected Behavior

Closing a modal should not change the current active slide.

Actual Behavior

No response

Swiper version

11.1.3

Platform/Target and Browser Versions

Windows 10, Chrome 124

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
@mdmontesinos
Copy link
Author

Thanks for the quick fix!! Any estimated date for the release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment