2
I need to focus on an object after closing the modal bootstrap
In bootstrap.dialog (old) I can do because I can program in the close event of the close button close, but the close of bootstrap 4 is Generic.
The idea would be like below:
$("#btneditar").on("click", function () {
var codcli = $("#codcli").val();
if (codcli <= 0) {
$("#aviso").modal();
$(".body-aviso").html("Escolha o cliente para editar");
$("#codcli").focus();
} else {
url = "minha url";
window.location = url;
}
});
As we know the line (obj)Focus lost focus when closing the modal
How to get around this situation?