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

pauseOnMouseEnter doesn't work properly #7107

Closed
6 tasks done
CernyMatej opened this issue Oct 13, 2023 · 0 comments
Closed
6 tasks done

pauseOnMouseEnter doesn't work properly #7107

CernyMatej opened this issue Oct 13, 2023 · 0 comments

Comments

@CernyMatej
Copy link

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/s/swiper-autoplay-forked-j4zycv?file=/index.html

Bug description

When the mouse enters the Swiper during a slide transition, the pauseOnMouseEnter autoplay flag does not function as expected.
When a transition is in progress, autoplay is temporarily paused and then resumed once the transition is completed. However, if the mouse enters the Swiper during this paused state, the pauseOnMouseEnter flag fails to keep the autoplay paused, allowing it to resume after the transition finishes. This issue is more noticeable when using slower transition speeds but also occurs at default speeds if the mouse enters the Swiper at the precise moment during a transition.

Expected Behavior

The pauseOnMouseEnter flag should reliably pause autoplay when the mouse hovers over the Swiper component, regardless of whether a slide transition is currently in progress or not. Autoplay should remain paused for the duration that the mouse is over the Swiper.

Actual Behavior

The pauseOnMouseEnter flag fails to keep autoplay paused when the mouse hovers over the Swiper component during an ongoing slide transition. Instead, autoplay resumes automatically once the transition is complete, even if the mouse is still over the Swiper.

Swiper version

10.3.1

Platform/Target and Browser Versions

macOS Chrome, Safari

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant