diff options
| author | patrickhlauke <[email protected]> | 2018-11-02 23:51:17 +0000 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2018-11-04 14:40:19 +0200 |
| commit | c46a0c7e88523523fef5335705bb98aeceba9fe4 (patch) | |
| tree | 0159f408eb9d8f8c84c4052ddce27a834860cec0 | |
| parent | 9cc237d0ba1eda0b7ca96cdbfbbf2df9a11c4d4c (diff) | |
| download | bootstrap-c46a0c7e88523523fef5335705bb98aeceba9fe4.tar.xz bootstrap-c46a0c7e88523523fef5335705bb98aeceba9fe4.zip | |
Replace touch-action: none with pan-y, remove preventDefault from touch event handling
| -rw-r--r-- | js/src/carousel.js | 3 | ||||
| -rw-r--r-- | scss/_carousel.scss | 2 |
2 files changed, 1 insertions, 4 deletions
diff --git a/js/src/carousel.js b/js/src/carousel.js index 3c7e2b2d9..550c48eb5 100644 --- a/js/src/carousel.js +++ b/js/src/carousel.js @@ -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 diff --git a/scss/_carousel.scss b/scss/_carousel.scss index 97ce6a29c..5e0949a92 100644 --- a/scss/_carousel.scss +++ b/scss/_carousel.scss @@ -16,7 +16,7 @@ } .carousel.pointer-event { - touch-action: none; + touch-action: pan-y; } .carousel-inner { |
