Enfocar un div con javascript

Si es posible, para ello agregamos en el div tabindex="0"
<div id="idDeDiv" tabindex="0"></div>

document.getElementById('idDeDiv').focus();

Links:
  1. https://stackoverflow.com/questions/3656467/is-it-possible-to-focus-on-a-div-using-javascript-focus-function
  2. http://alejandromoran.com/focusing-a-div-in-javascript/

1 comentario: