1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00

Replace touch-action: none with pan-y, remove preventDefault from touch event handling

This commit is contained in:
patrickhlauke 2018-11-02 23:51:17 +00:00 committed by XhmikosR
parent 9cc237d0ba
commit c46a0c7e88
2 changed files with 1 additions and 4 deletions

View file

@ -283,14 +283,11 @@ class Carousel {
if (this._pointerEvent && (event.originalEvent.pointerType === PointerType.TOUCH || event.originalEvent.pointerType === PointerType.PEN)) {
this.touchStartX = event.originalEvent.clientX
} else if (!this._pointerEvent) {
event.preventDefault()
this.touchStartX = event.originalEvent.touches[0].clientX
}
}
const move = (event) => {
event.preventDefault()
// ensure swiping with one touch and not pinching
if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
this.touchDeltaX = 0

View file

@ -16,7 +16,7 @@
}
.carousel.pointer-event {
touch-action: none;
touch-action: pan-y;
}
.carousel-inner {