[Bug] carousel shrinks / collapse
See original GitHub issueHi Learus,
the current version (3.3.3 mui v5) has a problem. Sometime in the autoplay or when you rush through the carousel the whole carousel shrinks / collapse. The problem occurre in chrome and safari, only when I use the dynamic height. When the height is set <Carousel height={350}>
it doesn’t happen.
here is a screenshot:
Greets, Tobias
Issue Analytics
- State:
- Created a year ago
- Reactions:25
- Comments:13 (1 by maintainers)
Top Results From Across the Web
Collapse - Bootstrap
The collapse JavaScript plugin is used to show and hide content. Buttons or anchors are used as triggers that are mapped to specific...
Read more >Problem with images resizing in carousel - HTML & CSS
I'm having some trouble with the images in one of my pages. They are in a carousel, but as the carousel slides to...
Read more >Slick slider not being responsive when resizing the window
Firstly when I resize the window slick slider doesn't calculate the new image widths until I interact with the slider, this is problem...
Read more >Bug Carousel - Bronx Zoo
Our favorite insects are all here — a long-legged praying mantis, a bright green grasshopper, even a dung beetle. A spin on the...
Read more >Creating an Accessible Image Carousel
For example, carousels typically lack proper keyboard support and semantics, making it difficult for users to navigate or parse the content.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Truth is, I’ve been trying to solve this issue for months. I think I’ve finally found a solution.
The problem is most likely caused by
framer/motion
animating aheight: 0
when the item enters and exits. Since the carousel checks the item’s height and sets its own height equal to it, sometimes it is too fast and changes the height of the carousel to 0, or something like that.I’ve added a check that sees if the item’s height is 0 and waits some milliseconds to recheck the height and set the carousel’s height.
Check out version v3.4.1, see if it works for you and let me know. 😄
@th2n10s4u You can install any version of any npm package by specifying the version number with the install command, like this :
npm install package_name@version_number
For this package it would be
npm install react-material-ui-carousel@3.4.2
You can also directly edit the version your package json, and rerun
npm install
afterwards (or yarn if you are using it)