Commit c46a0c7e authored by patrickhlauke's avatar patrickhlauke Committed by XhmikosR
Browse files

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

parent 9cc237d0
1 merge request!28721Hot test
Showing with 1 addition and 4 deletions
+1 -4
...@@ -283,14 +283,11 @@ class Carousel { ...@@ -283,14 +283,11 @@ class Carousel {
if (this._pointerEvent && (event.originalEvent.pointerType === PointerType.TOUCH || event.originalEvent.pointerType === PointerType.PEN)) { if (this._pointerEvent && (event.originalEvent.pointerType === PointerType.TOUCH || event.originalEvent.pointerType === PointerType.PEN)) {
this.touchStartX = event.originalEvent.clientX this.touchStartX = event.originalEvent.clientX
} else if (!this._pointerEvent) { } else if (!this._pointerEvent) {
event.preventDefault()
this.touchStartX = event.originalEvent.touches[0].clientX this.touchStartX = event.originalEvent.touches[0].clientX
} }
} }
const move = (event) => { const move = (event) => {
event.preventDefault()
// ensure swiping with one touch and not pinching // ensure swiping with one touch and not pinching
if (event.originalEvent.touches && event.originalEvent.touches.length > 1) { if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
this.touchDeltaX = 0 this.touchDeltaX = 0
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
} }
.carousel.pointer-event { .carousel.pointer-event {
touch-action: none; touch-action: pan-y;
} }
.carousel-inner { .carousel-inner {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment