Skip to content

Commit a067f8c

Browse files
Anaphasejacobmllr95
authored andcommitted
fix(carousel): fix touchmove handler to re-enable swipe gestures (#2844)
* fix(carousel): prevents touchmove handler from throwing errors when originalEvent is undefined * Removes evt.originalEvent altogether
1 parent 481bdcf commit a067f8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/carousel/carousel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ export default {
402402
},
403403
touchMove(evt) /* istanbul ignore next: JSDOM doesn't support touch events */ {
404404
// ensure swiping with one touch and not pinching
405-
if (evt.touches && evt.originalEvent.touches.length > 1) {
405+
if (evt.touches && evt.touches.length > 1) {
406406
this.touchDeltaX = 0
407407
} else {
408408
this.touchDeltaX = evt.touches[0].clientX - this.touchStartX

0 commit comments

Comments
 (0)