enabled the possibility of putting cancel default when confirmation is requested. If a user presses the Enter key in the confirmation accidental deletion ( example) , the better to cancel not confirm .
I second this. Maybe this is already possible right now with some hacking/callbacks?
Actually, the better is to allow for undo of deletion.
In general though, if you click a button to delete something, then a dialog asks for confirmation, pressing ENTER to affirm the action is common practice.
To cancel, you would expect to press ESC.
If the user accidentally does the opposite, this is what we call, "user error".
I'll third this. A "cancelButtonDefault: true" would be a nice option. Not all operations are undoable. It's hard to undo a email notification, for example.
This is now possible in SweetAlert 2.0 using dangerMode: true
That escalated quickly 馃槅
Thanks a lot for adding this.
Most helpful comment
I'll third this. A "cancelButtonDefault: true" would be a nice option. Not all operations are undoable. It's hard to undo a email notification, for example.