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
Second swal not executed #253
Comments
Could you try to show us your code in a JSFiddle? |
I've created a JSFiddle : http://jsfiddle.net/5pj7wwx9/ When I click on the button the first sweetAlert is shown, the callback is called but the second sweetAlert no. You will see in the JSFiddle i've tried with a setTimeout, it works after 2 seconds |
I'm having this same issue. Willing to provide any information needed to sort this. |
+1 to the resolve required for the issue |
incase this helps anyone. In my case I was able to sort this out by setting |
That is not a correct behavior, we shouldn't depend on what the value of closeOnCancel and closeOnConfirm is. |
I agree, but it might be the intended purpose of |
for me even that is not working. You can take a look at the fiddle I created. https://jsfiddle.net/madhureng/5pj7wwx9/16/ I will be more than happy that it gets fixed rather than api taking decision for me. |
@maddy2308 - you have too many clicks going on. It does work. Only thing I changed was took out your first document.click and changed it to document.ready. |
As @joenorton points out, this is what @maddy2308, the problem with your fiddle is that |
I also suffered from this issue, and I do believe this needs to be changed. @t4t5 Without looking at the source code, we can assume the following:
An easy solution to solve this issue would be as follows:
This will allow |
I had the same issue, got it solved by added a $timeout on the confirm action (with Angular) |
This bug occurs with me too in following situation:
The first confirmation alert will show fine, but the error alert will not show. Note: I didn't dived into the code, but looks like the close animation on any existing sweet alert should be cancelled and it should be immediately destroyed, then the 2nd alert will show fine. Edit: As I expected, the problem is with the first sweet alert confirmation. Setting I propose two solutions: 1st: If a second alert is called while an existent alert is being animated off, stop the animation process, close immediately the current alert and show the new one. 2nd: Queue the second alert to be opened when the close animation finish. The 2nd solution should make things smoother, while the 1st solution make the error modal appears faster! I'll try to do a pull request, but I never contributed on this project before, if someone knows where to fix, feel free to make the pull request first! :) |
@t4t5 Please take a look on my report and solutions, if you approve I can do the fix! |
You can use querySelectorAll , it returns all elements, so you canloop over the returned values
|
Had the same problem with my SweetAlert, when the second swal should appear, they don't, i just get error in my console, solved by including a $timeout in my function.
|
I had the same problem but solution of @PommeVerte solved it. I needed to set |
As of SweetAlert 2.0, |
SetTimeout can solve the problem after the callback, but I'd like to know more about the cause of the problem. |
tried two things which solved my problem.
|
This worked to me. Thanks! |
Hello,
I've this sweet-alter call :
In the callback I send a an event with backbone radio.
At this point all is good.
And in my event response i want to display an another sweet alert like this :
And the second sweet alert doesn't appear.
And i'm sure formDeleted function is executed.
Thanks for your help
The text was updated successfully, but these errors were encountered: