JSFiddle - React, Tailwind, and code Playground
HTML
<table>
<tr class="content-row-grilla">
<td>Codigo 1</td>
<td><input type="text" class="caja-serial" value=""/></td>
</tr>
<tr style="display:none">
<td><input type="hidden"/></td>
</tr>
<tr class="content-row-grilla">
<td>Codigo 2</td>
<td><input type="text" class="caja-serial" value=""/></td>
</tr>
<tr style="display:none">
<td><input type="hidden"/></td>
</tr>
<tr class="content-row-grilla">
<td>Codigo 2</td>
<td><input type="text" class="caja-serial" value=""/></td>
</tr>
</table>
JavaScript
$(function(){
$(".caja-serial").focusout(function(){
$(this).parents(".content-row-grilla").nextAll(".content-row-grilla").first().find('.caja-serial').focus();
})
});