davidjerleke / embla-carousel

A lightweight carousel library with fluid motion and great swipe precision.
https://www.embla-carousel.com
MIT License
5.37k stars 164 forks source link

[Bug]: Render when slides are wider than view size #815

Closed ferka123 closed 2 months ago

ferka123 commented 2 months ago

Which variants of Embla Carousel are you using?

Steps to reproduce

The bug occurs when the windows width is 325px or when i resize it to less than 325px The error: TypeError: Cannot read properties of undefined (reading 'right') I left a codesandbox below

Expected Behavior

I expect it to work properly on any window width

Additional Context

I use next.js 13 with styled components

What browsers are you seeing the problem on?

Chrome

Version

v. 8.0.0

CodeSandbox

https://codesandbox.io/p/devbox/funny-williams-y3cdy8

Before submitting

ferka123 commented 2 months ago

It doesn't occur if i remove slidesToScroll: "auto"

davidjerleke commented 2 months ago

Thanks @ferka123 for your bug report. I wonder if this is related to?

I'll look into it when possible.

davidjerleke commented 2 months ago

@ferka123 I've checked your CodeSandbox out and can confirm that this will be solved in the following PR:

ferka123 commented 2 months ago

@davidjerleke Thank you! This would be most helpful

davidjerleke commented 2 months ago

@ferka123 this has been released in v8.0.2.