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

Circle animation for success icon breaks when timing exceeds 4 seconds #2698

Labels

Comments

@ToshY
Copy link

ToshY commented Jan 9, 2024

Current behavior

Problem

In the documentation the following example for toasts is given.

const Toast = Swal.mixin({
  toast: true,
  position: "top-end",
  showConfirmButton: false,
  timer: 3000,
  timerProgressBar: true,
  didOpen: (toast) => {
    toast.onmouseenter = Swal.stopTimer;
    toast.onmouseleave = Swal.resumeTimer;
  }
});
Toast.fire({
  icon: "success",
  title: "Signed in successfully"
});

Clicking in the documentation on the "Try me" button, then hovering over the toast for atleast another +/- 4s, the following is visible.

image

After the timer exceeds roughly 4.2s, it seems to have broken the animation somewhere, as the top part of the success icon is now clearly visible.

image

This happens either by setting the timer option to a value larger than roughly 4250 or with didOpen option to stop timer on mouse enter.

Either way seems to happen when timer exceeds more than +/- 4.2 seconds

Expected behavior

Changing the timer/timing for toast should not impact the success icon animation.

Live demo !!! THIS FIELD IS REQUIRED !!!

The live demo template: https://codepen.io/nanone/pen/gOEMdrO

(same example as on Swal docs but with timer > 3000).

github-actions bot pushed a commit that referenced this issue Jan 11, 2024
## [11.10.3](v11.10.2...v11.10.3) (2024-01-11)

### Bug Fixes

* rm unnecessary transform styles on success icon ([69c2372](69c2372)), closes [#2698](#2698)
@limonte
Copy link
Member

limonte commented Jan 11, 2024

🎉 This issue has been resolved in version 11.10.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment