JSFiddle - React, Tailwind, and code Playground
HTML
<input id="one" type="text" />
<input id="two" type="text" />
JavaScript
var one = document.getElementById( "one" );
var two = document.getElementById( "two" );
one.addEventListener( "focus", function() { console.log( "one called" ); }, false );
setTimeout(function(){ one.focus();setTimeout(function(){ two.focus(); }, 200 ); }, 200 );
two.addEventListener( "focus", function() { console.log( "two called" ); }, false );