]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Replace touch-action: none with pan-y, remove preventDefault from touch event handling
authorpatrickhlauke <redux@splintered.co.uk>
Fri, 2 Nov 2018 23:51:17 +0000 (23:51 +0000)
committerXhmikosR <xhmikosr@gmail.com>
Sun, 4 Nov 2018 12:40:19 +0000 (14:40 +0200)
js/src/carousel.js
scss/_carousel.scss

index 3c7e2b2d9164116102c126a59b2c81de9b73b05d..550c48eb5543576f9a243aa03790a3c5b6966ba5 100644 (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
index 97ce6a29cca013f22e114366b4daccdb061ca218..5e0949a92a6afcc141259423a329b9a50575581b 100644 (file)
@@ -16,7 +16,7 @@
 }
 
 .carousel.pointer-event {
-  touch-action: none;
+  touch-action: pan-y;
 }
 
 .carousel-inner {