-
-
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
Too many Snaps on Firefox with containScroll: 'trimSnaps' #472
Comments
Hi @mUzzzie, Thanks for your bug report. This seems to be a bug in Firefox and my initial hunch is that it could be caused by how Firefox handles subpixels or similar. As you've mentioned, the Chrome/Safari behaviour is the correct behaviour. Feel free to investigate the code and see if you can find the culprit. This is the file that is responsible for the Best, |
I'm afraid i'm the wrong person for javascript matters. Sorry I can't help :/ |
@mUzzzie yes, of course. This is a bug so I will solve this. But I can’t give time estimates because I’m maintaining this lib for free so this project isn’t paying any of my bills 🙂. Best, |
@davidjerleke Sure, I know - That is why I'm all the more appreciating your work 🙂 |
Hi @mUzzzie, It seems like Firefox is including a lot of decimal places on numbers retrieved from Please test this CodeSandbox and see if this is working as expected. It would also be good if you could test it in Chrome and Safari to try different slide sizes that was causing the problem in Firefox. Best, |
Works perfectly in all browsers. |
Thanks for testing @mUzzzie! To be released with v8.0.0-rc05. |
@mUzzzie this has been released with v8.0.0-rc05. Thanks for this bug report. |
Bug is related to
Embla Carousel version
Describe the bug
When having containScroll: 'trimSnaps' enabled and setting slide width relative (e.g. 20%), embla adds empty snaps on Firefox which results in additional navigation dots and enabled arrow buttons when there is nothing to scroll. Sometimes at the beginning, sometimes at the end of the carousel. No issue on Chome or Safari.
CodeSandbox
https://codesandbox.io/s/mtj878?file=/index.html
Steps to reproduce
containScroll: 'trimSnaps', slide-width: 20%, 25% + gap, open in Firefox
Expected behavior
See Chrome
The text was updated successfully, but these errors were encountered: