From d51ee0dcf1cd020d3c1ee6f32e0ddb6dd84b6735 Mon Sep 17 00:00:00 2001 From: Johann-S Date: Mon, 14 Jan 2019 17:53:54 +0100 Subject: Fix Carousel's touch option to not add touch listeners when set to false (#28046) --- js/src/carousel.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'js/src') 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() { -- cgit v1.2.3