You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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. #6139
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is how I solved this issue in my Angular project, hopefully, it's replicable in other scenarios. Instead of providing the swiper container allowTouchMove directly in the template as such:
// this DOESN'T WORK (for me at least)
<swiper-container [allowTouchMove]="false">
// stuff
</swiper-container>
Instead, I did the following. In my home.component.ts I added an options variable:
@Component({ .. })
export class HomeComponent {
mySwiperOptions: SwiperOptions = {
allowTouchMove: false,
// other swiper options
}
}
And provided this variable to the swiper container in my home.component.html like so:
Check that this is really a bug
Reproduction link
https://codesandbox.io/s/brave-kilby-rfulow
Bug description
focusableElements: false with allowTouchMove: false
do not work together
Expected Behavior
when you click on the button in the slide, the prescribed handler is triggered
Actual Behavior
the slide is changed, after which the button becomes available for clicking
Swiper version
8.3.0
Platform/Target and Browser Versions
Windows Chrome, Firefox
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: