Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

Carousel inside a tab: wrong initial slide when loop is enabled #2476

@diegovogel

Description

@diegovogel

Describe the bug

If I put a carousel inside a tab panel and enable loop on the carousel, the carousel content is incorrect on load. The pagination indicator is correct (the first dot is active), but the content for the last slide is displayed. Then when I click the next arrow, it skips past the first slide and displays the second slide. Everything works after that.

To Reproduce

Steps to reproduce the behavior:

  1. Add a tab group to the page.
  2. Add a carousel inside one of the tab panels with at least two slides.
  3. Add the loop property to the carousel.
  4. Reload the page. The content for the last slide is displayed on load.

Demo

https://codepen.io/diegovogel/pen/pvjzPWX/b372da85666766a260fffbcaf1ec3d5d

Screenshots

Image

Browser / OS

  • OS: macOS
  • Browser: Chrome
  • Browser version: 138.0.7204.93

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThings that aren't working right in the library.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions