DEV Community

Discussion on: Keep focus on an input with jQuery

Collapse
 
celsodesa profile image
Celso de Sá


$("#input").focusout(()=> {
if($("#input").val() != ""){
$("#input").focus();
}
});

But it will prevent other inputs from being typed in.

Collapse
 
shrewmouse1 profile image
shrewmouse1

That's the whole point