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

Search for the custom navigation control buttons in the swiper-container #7714

Closed
6 tasks done
Ashkanph opened this issue Sep 2, 2024 · 3 comments
Closed
6 tasks done

Comments

@Ashkanph
Copy link
Contributor

Ashkanph commented Sep 2, 2024

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/sandbox/sn7mfn

Bug description

If there are more than one Swiper custom element with custom navigation buttons (for example in the container-end slot), if they use the same CSS selectors for their navigation buttons, clicking on one of the buttons swipes both sliders.

This can be solved by using different CSS selectors for the buttons, but in version 9 there was no need to have different CSS selectors; because the custom buttons were part of swiper.el, but in versions >= 10 the custom buttons are no longer descendants of swiper.el, they are descendants of swiper.hostEl.

Expected Behavior

There is no need to have different CSS selectors for the custom navigation buttons of the Swiper custom elements on a page.

Actual Behavior

No response

Swiper version

11.1.12

Platform/Target and Browser Versions

All of the platforms

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

Ashkanph commented Sep 2, 2024

Is the following change acceptable to the maintainers as a solution?

master...Ashkanph:swiper:fix_navigation_getel

@nolimits4web
Copy link
Owner

Is the following change acceptable to the maintainers as a solution?

master...Ashkanph:swiper:fix_navigation_getel

Yes, PR is welcome

@nolimits4web
Copy link
Owner

Fixed by #7716

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants