Tengo un cuadro de diálogo SweetAlert2 simple que le pide al usuario su nombre. Lo quiero para que el usuario tenga que ingresar algo para cerrar el cuadro. Probé la mejor solución para esta pregunta de StackOverflow, pero no funciona y todavía puedo salir del cuadro haciendo clic. Aquí está mi código.
var output; function getInput(question) { swal(question, { allowOutsideClick: false, content: "input", }).then((value) => { output=value; }); } getInput("Enter your name");