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

Swiper does not continue swiping after the mouse pointer leaves the swip with pauseOnMouseEnter enabled #7758

Open
5 of 6 tasks
subnoodle opened this issue Oct 9, 2024 · 0 comments

Comments

@subnoodle
Copy link

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/devbox/wonderful-bird-6ryzvv?workspaceId=8afc7e12-53df-4ff3-bbb9-67762da6912e

Bug description

I use swiper with autoplay:

autoplay: {
  delay: 4000,
  pauseOnMouseEnter: true
},

When entering the current swipe, independently of it's transition state, the autoplay stops.
When i leave the swipe area again, the slides do not continue to slide automatically again.
This is the case when i:

  • just leave the swiper-area;
  • leave the swiper-area and click on another website-element to ensure focus is elsewhere;
  • leave the browser window completely and click on another window.

The swiper re-engages the autoplay after reloading the webpage.

Similar, but different issue: #7107

Expected Behavior

With autoplay and option pauseOnMouseEnter set to true, i would expect:

  • The auto-sliding stops when the mouse cursor enters the swiper-area (which is the case)
  • The auto-sliding continues when the mouse cursor leaves the swiper-area (which is not the case)

Actual Behavior

With autoplay and option pauseOnMouseEnter set to true, swiper 11.1.14 does:

  • The auto-sliding stops when the mouse cursor enters the swiper-area
  • The auto-sliding does not continue when the mouse cursor leaves the swiper-area

Swiper version

11.1.14

Platform/Target and Browser Versions

macOS with Chrome, Firefox, 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