question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] carousel shrinks / collapse

See original GitHub issue

Hi 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:

image

Greets, Tobias

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:25
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
Learuscommented, May 28, 2022

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 a height: 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. 😄

1reaction
Reawcommented, Jun 20, 2022

@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)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found