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

Sometimes when I click on a pagination bullet, the slider goes to a wrong slide #3816

Closed
1 of 3 tasks
SilencerWeb opened this issue Sep 11, 2020 · 5 comments
Closed
1 of 3 tasks

Comments

@SilencerWeb
Copy link

This is a (multiple allowed):

  • bug

  • enhancement

  • feature-discussion (RFC)

  • Swiper Version: 6.2.0 (of course, if your demos are using the latest version)

  • Platform/Target and Browser Versions: macOS 10.15.6, Chrome 85.0.4183.102 (Official Build) (64-bit)

  • Live Link or JSFiddle/Codepen or website with isssue: Demo, Source Code

What you did

Sometimes when I click on a pagination bullet, the slider goes to a wrong slide. Here you can see the video

Expected Behavior

The slider should go to a correct slide

Actual Behavior

The slider went to a wrong slide

@pam81
Copy link

pam81 commented Sep 27, 2020

Hi, I did same test but only clicking quicly between 2 items ( page 3 and 4) and it moves to page 2 in a moment.
It is lossing the real Index when you click wuicly between pages.
Also I try to change default speed from 300 to 600 but the issue is still happening.

VinhVictor added a commit to ecomsolid/swiper that referenced this issue Nov 7, 2020
VinhVictor added a commit to ecomsolid/swiper that referenced this issue Nov 7, 2020
VinhVictor added a commit to ecomsolid/swiper that referenced this issue Nov 7, 2020
VinhVictor added a commit to ecomsolid/swiper that referenced this issue Nov 9, 2020
thanhdx0 added a commit to ecomsolid/swiper that referenced this issue Nov 10, 2020
thanhdx0 pushed a commit to ecomsolid/swiper that referenced this issue Nov 26, 2020
thanhdx0 pushed a commit to ecomsolid/swiper that referenced this issue Nov 26, 2020
thanhdx0 pushed a commit to ecomsolid/swiper that referenced this issue Nov 26, 2020
thanhdx0 pushed a commit to ecomsolid/swiper that referenced this issue Nov 26, 2020
@vltansky vltansky mentioned this issue Jan 21, 2021
@vltansky
Copy link
Collaborator

@SilencerWeb I can't reproduce the issue.
Maybe you accidentally swiping? Try to reproduce this issue on this example:
https://stackblitz.com/edit/swiper-demo-7-custom-pagination-svb5wz?file=index.html

@SilencerWeb
Copy link
Author

@vltansky in your example everything is ok, that's probably an accident swiping but I'm not sure why the slider thinks I'm swiping when I'm not doing anything close to this

@JoaoPauloLisboa
Copy link

@vltansky in your example, if you enable simulateTouch, you can reproduce the error.

@domstubbs
Copy link
Contributor

domstubbs commented Mar 29, 2021

I’ve noticed that it is quite easy to accidentally trigger a drag interaction if your mouse moves even slightly while clicking on a pagination button. I’ve only experienced this with Chromium, never Webkit. I haven’t found myself going to the wrong slide, but I have found that I have to click pagination buttons more than once because the first click was processed as a small drag event.

I’m going to disable simulateTouch for my implementation, but if it would be easy to disable simulated touch events within the swiper-button-x elements that seems like it would offer a better experience across the board. Fallback drag support in neutral areas is a nice feature, but I’m not sure it should be a factor when interacting with dedicated controls.

Edit: I’ve just twigged that this is easily resolvable by setting swipeHandler: '.swiper-wrapper’, assuming you’re happy to lose native swipe support on buttons as well.

@vltansky vltansky added this to the v7 milestone Jul 8, 2021
Repository owner locked and limited conversation to collaborators Aug 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants