Thanks to @toverux and his idea, now we have improved the way of handling dismissals:
Legacy, still works:
if (dismiss == 'overlay') {
//
}
NEW RECOMMENDED WAY 🎉 🎉 🎉
if (dismiss == swal.DismissReason.backdrop) {
//
}
⚠️ ⚠️ ⚠️ DEPRECATION WARNING ⚠️ ⚠️ ⚠️
'overlay'
is DEPRECATED and replaced by DismissReason.backdrop
, it will stop work in the next major release.