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

Negative timeLeft and percentage in autoplayTimeLeft after autoplay stop then start #7084

Closed
5 of 6 tasks
DrawThree opened this issue Oct 5, 2023 · 0 comments
Closed
5 of 6 tasks

Comments

@DrawThree
Copy link

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/s/c2px7m

Bug description

After stopping autoplay, waiting for a number of seconds longer than the delay time, then starting autoplay, the timeLeft and percentage values in the autoplayTimeLeft event are negative.

Expected Behavior

The timeLeft and percentage should accurately reflect the time left before transition to the next slide and percentage of that time related to autoplay delay.

Actual Behavior

Using the reproduction link, run swiper.autoplay.stop(), wait for 5-10 seconds, then run swiper.autoplay.start().

The autoplayTimeLeft event will get negative numbers for timeLeft and percentage, and the progress countdown UI element will reflect this.

Swiper version

10.3.1

Platform/Target and Browser Versions

Windows Chrome 117.0.5938.132

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