-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
when I click on a button inside a slider, it brings that slider to the first position #5524
Comments
I can confirm this matter - but our slider only contains images with href-links. 2022-03-08T13-13-57D0-19.mp4Works as expected, when using Swiper 7.4.1, but all versions > 8.0.0 show the same problem... |
Also experiencing the same issues, same as @Voodoopupp, using anchor hrefs and getting the jump to position one. Reverted to 7.4.1 and all good. Noticed this issue on Android devices |
It also happens on my application, but accidentally. I tried the site's demo, and same as my application‘s happening. |
SAME ON v 8.x. Tried everything from this list:
with no luck Marked price with red to better understanding clicking.mp4hey @nolimits4web can you please take a look? 7.4.1 does not reproduce this behaviour, clicking on the buttons does not make slide active |
Same here: According to documentation slideToClickedSlide by default is set to false. However:
Using it for a tag list of about 40 elements
Expected Behavior
Actual Behavior
Swiper 8.0.7 |
I have the same problem. If I add Besides, I have the same problem with tag "a" in a mobile device (Android). In my example on codepen 1st link works, 2nd link works, but 3rd becomes active, instead of opening fancybox video_2022-05-14_14-09-09.mp4. |
Same problems on |
Same for me but only when In my case, I display 6boxes but want to iterate by 1... |
I just did a fast check of what might cause the error and found this commit: It seems like the 'focus' is playing with us Adding |
The problem persists on version 8.3.2. |
Yes but I noticed it's CPU intensive. My sliders become laggy so I hope there's a better solution. related: #5625 |
This is still an issue on mobile/touch devices in version 8.4.2 |
I have a solution that mobile touch on ui elements like links or select fields no longer makes the slide jump to first place. Touch events also trigger a focus event. I added a condition to check that the focus event was not triggered by touch. |
adding "a11y: false" in my swiper options worked for me. For versions 9 and 10 |
Check that this is really a bug
Reproduction link
https://sendvid.com/2n22p5ns
Bug description
When I click on a button that I have inside my slider, instead of executing what the button should do, what it does is take that slider to position 1 of the carousel. what I want is that this does not happen since it does not allow the action of the button to be executed, which is to open an overlay. I leave a video so that it is better understood.
Expected Behavior
No response
Actual Behavior
No response
Swiper version
@8 cdn
Platform/Target and Browser Versions
Chrome
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: