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

Autoplay resumes before mouse has left the carousel container with stopOnMouseEnter set to true #644

Closed
2 tasks done
Tracked by #321
tombryden opened this issue Dec 2, 2023 · 5 comments · Fixed by #660
Closed
2 tasks done
Tracked by #321
Labels
bug Something isn't working resolved This issue is resolved

Comments

@tombryden
Copy link

tombryden commented Dec 2, 2023

Bug is related to

  • embla-carousel-react
  • embla-carousel-autoplay

Embla Carousel version

  • v8.0.0-rc15

Describe the bug

With stopOnMouseEnter set to true and stopOnInteraction set to false, dragging the carousel without the mouse leaving the carousel container causes autoplay to begin scrolling despite the mouse not leaving the carousel container. Here is a gif showing this behaviour

CodeSandbox

https://codesandbox.io/p/github/tombryden/embla-autoplay-bug/mouse-enter-bug

Steps to reproduce

  1. Hover mouse over slide
  2. Observe that autoplay stops while hovered
  3. Drag slide to move to another slide
  4. Observe that autoplay starts, despite mouse not leaving carousel

Expected behavior

Autoplay should not restart after drag interaction with stopOnMouseEnter set to true

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

Thanks @tombryden for a complete bug report. I'll look into it when I get the chance.

Best,
David

davidjerleke added a commit that referenced this issue Dec 22, 2023
@davidjerleke
Copy link
Owner

Hi @tombryden,

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

@davidjerleke davidjerleke added the awaiting response Issue is awaiting feedback label Dec 22, 2023
@tombryden
Copy link
Author

Hi @davidjerleke - just tested now, seems to be working as expected. Thanks!

@davidjerleke
Copy link
Owner

@tombryden thank you for confirming 👍🏻.

Cheers,
David

davidjerleke added a commit that referenced this issue Dec 22, 2023
davidjerleke added a commit that referenced this issue Dec 22, 2023
davidjerleke added a commit that referenced this issue Dec 22, 2023
@davidjerleke davidjerleke added resolved This issue is resolved and removed awaiting response Issue is awaiting feedback labels Dec 22, 2023
@davidjerleke
Copy link
Owner

@tombryden a bug fix for this was just released in v8.0.0-rc16.

@davidjerleke davidjerleke mentioned this issue Dec 23, 2023
37 tasks
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