Skip to content
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

Loop + scrollTo with jump occasionally fails and selected slide turns white #652

Closed
1 of 9 tasks
dlhagstroem opened this issue Dec 13, 2023 · 5 comments · Fixed by #682
Closed
1 of 9 tasks

Loop + scrollTo with jump occasionally fails and selected slide turns white #652

dlhagstroem opened this issue Dec 13, 2023 · 5 comments · Fixed by #682
Labels
bug Something isn't working resolved This issue is resolved

Comments

@dlhagstroem
Copy link

dlhagstroem commented Dec 13, 2023

Bug is related to

  • embla-carousel (core package)
  • embla-carousel-react
  • embla-carousel-vue
  • embla-carousel-svelte
  • embla-carousel-autoplay
  • embla-carousel-auto-height
  • embla-carousel-class-names
  • embla-carousel-docs (documentation)
  • embla-carousel-docs (generator)

Embla Carousel version

  • v8.0.0-rc15

Describe the bug

Selected slide sometimes turns white when using emblaApi.scrollTo(index, true).

Prerequisites:

  1. Use option loop: true when initiating carousel
  2. Call scrollTo function with jump: true

CodeSandbox

https://xtcdzj.csb.app/

Steps to reproduce

  1. Click on thumbnail in the end
  2. Click thumbnail in the start
  3. Repeat until step 4
  4. See that selected slide occasionally turns white

Expected behavior

Show selected image (slide)

Additional context

Seems to be related to the loop option some how, when carousel "takes the closest way" to the selected index.

@dlhagstroem dlhagstroem added the bug Something isn't working label Dec 13, 2023
@davidjerleke
Copy link
Owner

Hi @dlhagstroem,

Thanks for your complete bug report. I will look into this when I get the chance.

Best,
David

@davidjerleke
Copy link
Owner

@dlhagstroem can you reproduce the bug in this CodeSandbox? Thanks in advance!

@davidjerleke davidjerleke added the awaiting response Issue is awaiting feedback label Jan 3, 2024
@dlhagstroem
Copy link
Author

@davidjerleke I gave it a hard round and no - I could not reproduce the issue in the provided sandbox :)

@davidjerleke
Copy link
Owner

@dlhagstroem thank you for testing it 👍🏻. I will release a patch including the bug fix then. Stay tuned.

Best,
David

@davidjerleke davidjerleke added upcoming A feature or bug fix is on its way for this issue and removed awaiting response Issue is awaiting feedback labels Jan 5, 2024
davidjerleke added a commit that referenced this issue Jan 6, 2024
davidjerleke added a commit that referenced this issue Jan 6, 2024
@davidjerleke davidjerleke added resolved This issue is resolved and removed upcoming A feature or bug fix is on its way for this issue labels Jan 6, 2024
@davidjerleke
Copy link
Owner

@dlhagstroem a bug fix for this was just released in v8.0.0-rc19.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved This issue is resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants