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

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

Open
justin-hackin opened this issue Dec 17, 2014 · 4 comments

Comments

@justin-hackin
Copy link

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
Copy link
Author

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.

@lipis
Copy link
Owner

lipis commented Dec 17, 2014

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

@Braunson
Copy link

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.

@santhu342
Copy link

santhu342 commented Apr 26, 2018

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

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

4 participants