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

[Bug]: Autoplay never starts if page with carousel is loaded in inactive browser tab #1082

Closed
5 of 15 tasks
trumko opened this issue Dec 9, 2024 · 2 comments · Fixed by #1101
Closed
5 of 15 tasks
Assignees
Labels
bug Something isn't working plugin Issue is related to plugins resolved This issue is resolved

Comments

@trumko
Copy link

trumko commented Dec 9, 2024

Which variants of Embla Carousel are you using?

  • embla-carousel (Core)
  • embla-carousel-react
  • embla-carousel-vue
  • embla-carousel-svelte
  • embla-carousel-autoplay
  • embla-carousel-auto-scroll
  • embla-carousel-solid
  • embla-carousel-auto-height
  • embla-carousel-class-names
  • embla-carousel-fade
  • embla-carousel-docs (Documentation)
  • embla-carousel-docs (Generator)

Steps to reproduce

  1. Open a new tab that contains a carousel, but do not switch to it immediately.
  2. Allow the webpage in the new tab to fully load while remaining inactive.
  3. After the page has loaded, switch to the tab containing the carousel.
  4. Observed Behavior: The autoplay functionality of the carousel fails to activate upon viewing the tab.

Expected Behavior

If playOnInit flag has never been set to false the autoplay should work properly for the carousel.

Additional Context

Thank you so much for this carousel, it's awesome from every perspective!

What browsers are you seeing the problem on?

No response

Version

8.5.1

CodeSandbox

https://codesandbox.io/p/sandbox/2yxkrn

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues
  • I agree to follow this project's Contributing Guidelines for bug reports
@trumko trumko added the bug Something isn't working label Dec 9, 2024
@davidjerleke
Copy link
Owner

davidjerleke commented Dec 29, 2024

@trumko thank you for your bug report. I will look into this when I get the chance. I'm working on v9 at the time of writing so it might take some time for me to solve this.

@davidjerleke davidjerleke changed the title [Bug]: autoplay never starts if page with carousel is loaded in inactive browser tab [Bug]: Autoplay never starts if page with carousel is loaded in inactive browser tab Dec 29, 2024
@davidjerleke davidjerleke added the plugin Issue is related to plugins label Dec 29, 2024
davidjerleke added a commit that referenced this issue Jan 7, 2025
davidjerleke added a commit that referenced this issue Jan 7, 2025
davidjerleke added a commit that referenced this issue Jan 7, 2025
[Bug]: Autoplay never starts if page with carousel is loaded in inactive browser tab
@davidjerleke davidjerleke added the resolved This issue is resolved label Jan 7, 2025
@davidjerleke
Copy link
Owner

@trumko a bug fix for this was just released in 8.5.2.

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