We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51ce9d1 commit bfd1eceCopy full SHA for bfd1ece
packages/coreui-vue/src/components/carousel/CCarousel.ts
@@ -119,7 +119,7 @@ const CCarousel = defineComponent({
119
const nextItemWhenVisible = () => {
120
// Don't call next when the page isn't visible
121
// or the carousel or its parent isn't visible
122
- if (!document.hidden && isInViewport(carouselRef.value)) {
+ if (!document.hidden && carouselRef.value && isInViewport(carouselRef.value)) {
123
handleControlClick('next')
124
}
125
@@ -142,7 +142,7 @@ const CCarousel = defineComponent({
142
143
144
const handleScroll = () => {
145
146
visible.value = true
147
} else {
148
visible.value = false
0 commit comments