Fix #5320 – Carousel blocking touch scroll

pull/5513/head
Luke Edwards 2024-04-03 09:40:55 +13:00 committed by GitHub
parent 40c7c574ec
commit 8f6119a5d1
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) { 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(); e.preventDefault();
} }
}, },