mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-01 13:24:25 +01:00
Carousel - do not call next when the carousel or the parent isn't visible
This commit is contained in:
parent
a77f515a22
commit
58b54b6c15
@ -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()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user