themesberg / themesberg/flowbite
Carousel component stops working when navigating back to page in Astro with View Transitions
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 9.4k
- Forks
- 862
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
I am using the carousel component in my Astro project with View transition and all works fine on the first page load. When I navigate to another page and back to this page, the carousel does not work. I see the messages fired by OnChange event , as I put it on cycle. However, on looking at the HTML the elements remain hidden and I see no change.
To Reproduce
Steps to reproduce the behavior:
- Use the carousel component in any page
- Navigate to another page and back
- The carousel component is not shown
Expected behavior
The carousel component should work the same as on the first page load as on subsequent page loads
Screenshots
First page load
Navigating to another page and back
Desktop (please complete the following information):
- OS: Mac
- Browser : Arc
- Version : Chromium Engine Version 124.0.6367.61
Additional context
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the carousel issue in an Astro page using View Transitions: load the page, navigate elsewhere, and return. Inspect the carousel HTML and compare the first load with the subsequent load; done means the carousel is visible and behaves the same after returning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, tailwindcss
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100