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:
-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 a5d5f143a4..27a8f7d3b8 100644
--- a/js/src/carousel.js
+++ b/js/src/carousel.js
@@ -131,7 +131,9 @@ const Carousel = (($) => {
nextWhenVisible() {
// Don't call next when the page isn't visible
- if (!document.hidden) {
+ // or the carousel or it's parent isn't visible
+ if (!document.hidden &&
+ ($(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden')) {
this.next()
}
}