diff --git a/js/src/carousel.js b/js/src/carousel.js index a43d86b189..06c20b5093 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() { diff --git a/js/tests/unit/carousel.js b/js/tests/unit/carousel.js index 6c28b67214..0d2a0f3271 100644 --- a/js/tests/unit/carousel.js +++ b/js/tests/unit/carousel.js @@ -948,7 +948,7 @@ $(function () { $textArea.trigger(eventKeyDown) }) - QUnit.test('Should not go to the next item when the carousel is not visible', function (assert) { + QUnit.test('should not go to the next item when the carousel is not visible', function (assert) { assert.expect(2) var done = assert.async() var html = '