Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoSot <geo.sotis@gmail.com>2022-03-10 03:12:19 +0300
committerXhmikosR <xhmikosr@gmail.com>2022-03-10 16:22:14 +0300
commit6e904341c9a4a07ea0232850a2dcd4ddc7dfa00a (patch)
tree2e16a9a3b45722506cb6ec1329d262a600ae74e6 /js/src/carousel.js
parent3673933fe74b4323267b0b0a7871a393ce2ff5cb (diff)
Carousel: change class check as it can only exist if carousel is sliding
Also, fix the corresponding test
Diffstat (limited to 'js/src/carousel.js')
-rw-r--r--js/src/carousel.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/js/src/carousel.js b/js/src/carousel.js
index 5a9b2dc846..7a30beb10e 100644
--- a/js/src/carousel.js
+++ b/js/src/carousel.js
@@ -59,7 +59,6 @@ const SELECTOR_ACTIVE = '.active'
const SELECTOR_ITEM = '.carousel-item'
const SELECTOR_ACTIVE_ITEM = SELECTOR_ACTIVE + SELECTOR_ITEM
const SELECTOR_ITEM_IMG = '.carousel-item img'
-const SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev'
const SELECTOR_INDICATORS = '.carousel-indicators'
const SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]'
const SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]'
@@ -142,7 +141,7 @@ class Carousel extends BaseComponent {
this._stayPaused = true
}
- if (SelectorEngine.findOne(SELECTOR_NEXT_PREV, this._element)) {
+ if (this._isSliding) {
triggerTransitionEnd(this._element)
this.cycle(true)
}