bootstrap-sweetalert icon indicating copy to clipboard operation
bootstrap-sweetalert copied to clipboard

when one swal is closing, if another swal call is made, it is ignored

Open justin-hackin opened this issue 10 years ago • 4 comments

using isConfirm will not suffice in this case because there is more complex logic through multiple objects before the second call is made

justin-hackin avatar Dec 17 '14 19:12 justin-hackin

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.

justin-hackin avatar Dec 17 '14 19:12 justin-hackin

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..

lipis avatar Dec 17 '14 20:12 lipis

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.

Braunson avatar Jan 19 '15 01:01 Braunson

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

santhu342 avatar Apr 26 '18 10:04 santhu342