How can I keep the html input always in focus? Using the autofocus attribute when creating the element helps to focus at pageload, but it does not keep the focu
autofocus
For FIREFOX, Try using setTimeOut, it works :
My JS :
myFocusFunction(){ let myInput = document.getElementById('idOfInput'); setTimeout(function() { myInput .focus(); }, 100); }
my Html :