mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-12 00:24:03 +02:00
Carousel - do not call next when the carousel or the parent isn't visible
This commit is contained in:
@@ -131,7 +131,9 @@ const Carousel = (($) => {
|
|||||||
|
|
||||||
nextWhenVisible() {
|
nextWhenVisible() {
|
||||||
// Don't call next when the page isn't visible
|
// 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()
|
this.next()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user