Skip to content

Commit

Permalink
fix: touch focusableElements jumps element (#6139)
Browse files Browse the repository at this point in the history
to first position
- check if focus event triggered by touch
- don't jump the slide element

Co-authored-by: Andreas Henzgen <[email protected]>
  • Loading branch information
Blacklightdesign and Andreas Henzgen authored Nov 14, 2022
1 parent 8d19452 commit 339f52e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/a11y/a11y.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ export default function A11y({ swiper, extendParams, on }) {
swiper.visibleSlides &&
swiper.visibleSlides.includes(slideEl);
if (isActive || isVisible) return;
if (e.sourceCapabilities && e.sourceCapabilities.firesTouchEvents) return;
if (swiper.isHorizontal()) {
swiper.el.scrollLeft = 0;
} else {
Expand Down

0 comments on commit 339f52e

Please sign in to comment.