JSFiddle - React, Tailwind, and code Playground
by Rino Raj
HTML
<div id="tablediv">
<table class="thistbl">
<tr>
<td tabindex="0"></td>
<td tabindex="0"></td>
<td tabindex="0"></td>
</tr>
</table>
</div>
<form id="formid">
<input type="text" tabindex="1" id="inputid" />
</form>
CSS
table.thistbl td {
border: 2px solid black;
width: 20px;
height: 20px;
padding: 5px;
}
#formid {
display: none;
position: absolute;
width: 300px;
height: 40px;
left: 20px;
top: 60px;
background-color: #CCC;
}
JavaScript
$(function() {
$('#tablediv').on('keydown', 'td', function(e) {
$('#formid').show();
$('#inputid').focus();
});
});