Skip to content

Commit

Permalink
Merge pull request #5513 from lukereative/fix-5320
Browse files Browse the repository at this point in the history
Fix #5320 – Carousel blocking touch scroll
  • Loading branch information
tugcekucukoglu authored Apr 3, 2024
2 parents 40c7c57 + 8f6119a commit 864f66a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion components/lib/carousel/Carousel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,12 @@ export default {
};
},
onTouchMove(e) {
if (e.cancelable) {
const touchobj = e.changedTouches[0];
const diff = this.isVertical()
? touchobj.pageY - this.startPos.y
: touchobj.pageX - this.startPos.x;
if (Math.abs(diff) > this.swipeThreshold && e.cancelable) {
e.preventDefault();
}
},
Expand Down

0 comments on commit 864f66a

Please sign in to comment.