bootstrap-sweetalert
bootstrap-sweetalert copied to clipboard
when one swal is closing, if another swal call is made, it is ignored
using isConfirm will not suffice in this case because there is more complex logic through multiple objects before the second call is made
One can workaround this by using a setTimeout to wait for the first one to close but it would be nice if the call was not ignored and was somehow queued until the first one closed.
That's a bit confusing on what you are saying here.. an example on JSFiddle or my latest favorite JS Bin would be the best..
When doing so:
swal({
title: 'Whatever',
text: 'My example text here',
type: 'info',
closeOnConfirm: false,
}, function(){
swal("Success", "Something was successful", "success");
});
After clicking 'OK' the callback modal immediately shows and closes within seconds.
For anyone having this issue, you need to make sure you set closeOnConfirm to false as I've added in the example above.
swal({
title: 'Whatever',
text: 'My example text here',
type: 'info',
closeOnConfirm: false,
}, function(){
window.location.replace("http://example.com");
});
iam run in this type..
its working or nor