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

Cannot disable body auto-scroll when changing slides while swiper is out of viewport #7525

Closed
5 of 6 tasks
kelvin2200 opened this issue May 9, 2024 · 1 comment
Closed
5 of 6 tasks

Comments

@kelvin2200
Copy link

Check that this is really a bug

  • I confirm

Reproduction link

https://nolink

Bug description

I have 2 swipers, one on top of the other, and they are connected. Navigating in one, also changes the slide in the second.
The first swiper is full-height, making the second to not be in the viewport.
If I scroll the page to the second swiper and navigate to next/prev slide, the body automatically scrolls to the either the top, or the position where the first slider is.

And NO, the navigation buttons don't have any hash nor link attached to them.

How can I prevent this from happening?

Note:
I am using Wordpress and elementor's carousel widgets + jQuery to achieve this functionality, and swiper tampering is fairly limited. Even so, if there is some sort of option I can disable, please let me know.

Expected Behavior

(body/page) scroll position to be preserved when changing slides.

Actual Behavior

Page is scrolling to top.

Swiper version

8.4.5

Platform/Target and Browser Versions

all

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
@nolimits4web
Copy link
Owner

https://nolink/

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