showLoaderOnConfirm issues when used with customClass
See original GitHub issueWhen the options are
showloaderonconfirm: true,
customclass: {
confirmbutton: "swal-confirm-button-anyColor"
}
the loader spins with text displayed inside

Expected behavior
the loader should spin clean
Live demo
live demo: https://jsfiddle.net/dgubav27/1/
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Using sweetalert2 with bootstrap 4 - Stack Overflow
The question is: How can I let the default style for the loader (using bs4)? Or maybe customize the style for the showLoaderOnConfirm...
Read more >SweetAlert2 - a beautiful, responsive, customizable and ...
A beautiful, responsive, customizable and accessible (WAI-ARIA) replacement for JavaScript's popup boxes.
Read more >Guides - SweetAlert
If you have a special use case, you can give your modal a custom class. showCancelButton and showConfirmButton are no longer needed. Instead,...
Read more >Sweet Alert Padding Issue - JSFiddle - Code Playground
showLoaderOnConfirm &&!t.preConfirm&&r("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with ...
Read more >Input field unable to edit or made changes in sweet alert
I'll revive this thread because I'm having a similar issue. ... (); in2= $('#input2').val(); console.log(in1,in2) // use user input value freely } },....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
width: 100%
andwidth: 100% !important;
are different things 😉Use
width: 100%
and you’ll be fine.The proper fix should be the separation of the loader and the confirm button. That’ll be done in the next major release.
Until then, please use this:
and please update your
sweetalert2
dependency, I just published a new release (v9.10.10
) so the suggested workaround would work.