aboutsummaryrefslogtreecommitdiff
path: root/js/src
diff options
context:
space:
mode:
authorJohann-S <[email protected]>2019-01-14 17:53:54 +0100
committerXhmikosR <[email protected]>2019-01-14 18:53:54 +0200
commitd51ee0dcf1cd020d3c1ee6f32e0ddb6dd84b6735 (patch)
treec0e33eb20232cdaca54c21f2a02f665f9e8a800d /js/src
parent3d350c3b3454781988948512bf4a9eb6e13f0be1 (diff)
downloadbootstrap-d51ee0dcf1cd020d3c1ee6f32e0ddb6dd84b6735.tar.xz
bootstrap-d51ee0dcf1cd020d3c1ee6f32e0ddb6dd84b6735.zip
Fix Carousel's touch option to not add touch listeners when set to false (#28046)
Diffstat (limited to 'js/src')
-rw-r--r--js/src/carousel.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/src/carousel.js b/js/src/carousel.js
index a43d86b18..06c20b509 100644
--- a/js/src/carousel.js
+++ b/js/src/carousel.js
@@ -268,7 +268,9 @@ class Carousel {
.on(Event.MOUSELEAVE, (event) => this.cycle(event))
}
- this._addTouchEventListeners()
+ if (this._config.touch) {
+ this._addTouchEventListeners()
+ }
}
_addTouchEventListeners() {