-
-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scroll snap and slides to scroll calculations are too sensitive #649
Comments
Another example if we remove max-width from container (watch the dots!) embla2.mp4 |
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, |
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, |
@mozart77 a bug fix for this was just released in |
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
The text was updated successfully, but these errors were encountered: