Closed mozart77 closed 6 months ago
Another example if we remove max-width from container (watch the dots!)
https://github.com/davidjerleke/embla-carousel/assets/6299334/fba9ffec-2852-45cc-b6b6-340fb3d1deb9
Hi @mozart77,
Thank you for your bug report. Yes I’ve actually noted this issues. They are most likely caused by the transition from reading element.getBoundingClientRect to offset dimensions (e. g. offsetWidth, offsetLeft):
I basically missed to refactor the rounding safeties used in the code. Because client rects give you floating points which is why it was needed before while offset dimensions return whole integers so this is probably causing problems now. I will look into this when possible. Thanks for creating a bug so devs can track this issue.
Best, David
Hi @mozart77,
Would you mind testing the following CodeSandbox and see if it behaves as expected now? Please let me know if you intend to test it or not so you don't leave me hanging. Thanks!
Best, David
@mozart77 a bug fix for this was just released in v8.0.0-rc16
.
Bug is related to
Embla Carousel version
v8.0.0rc15
Describe the bug
Function scrollSnapList() returns wrong number of elements.
CodeSandbox
- The link to a CodeSandbox that demonstrates the bug clearly.
Steps to reproduce
Expected behavior
One page or none when all slides are visible
Additional context
Video: https://github.com/davidjerleke/embla-carousel/assets/6299334/8bfdba46-2969-4411-9751-50c8b9477eaf