lipis / bootstrap-sweetalert

:cake: A beautiful "replacement" for JavaScript's alert ⛺
https://lipis.github.io/bootstrap-sweetalert/
MIT License
2.1k stars 503 forks source link

location.reload(true) not working after timer is expired #71

Closed marioene closed 6 years ago

marioene commented 6 years ago

Hi,

After timer is expired reload is not working.

swal({ title: "Succes!", text: "Stergere efectuata cu succes!", type: "success", timer: 3000, showConfirmButton: false, }, function() { location.reload(true); });

With showConfirmButton: true, is working.

Is there a solution?

marioene commented 6 years ago

Solved with setTimeout

swal({ title: "Succes!", text: "Stergere efectuata cu succes!", type: "success", timer: 3000, showConfirmButton: false, }, function() { location.reload(true); }); setTimeout(function() {location.reload(true); }, 3000);