Search code examples
javascriptjquerysweetalertsweetalert2

SweetAlert2 - if one button, it gets highlighted as soon as modal opens


I just changed from using SweetAlert to SweetAlert 2. It took a while to get around but I achieved what I wanted except one thing.

As soon as I open the modal, if there is 1 button and no inputs, etc., the button gets highlighted like this:

enter image description here

Is there a way to stop it getting highlighted before any interaction is made button?


Update:

enter image description here


Solution

  • just add this code into your css

    button.swal2-styled {
        outline: none;
    }