mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 17:32:36 +00:00
Fix #5320 – Carousel blocking touch scroll
This commit is contained in:
parent
40c7c574ec
commit
8f6119a5d1
1 changed files with 6 additions and 1 deletions
|
@ -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();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue