Merge pull request #5513 from lukereative/fix-5320

Fix #5320 – Carousel blocking touch scroll
pull/5523/head
Tuğçe Küçükoğlu 2024-04-03 14:31:25 +03:00 committed by GitHub
commit 864f66a6a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -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();
}
},