Handsontable example
by fuggfuggfugg
HTML
<div id="example1" class="hot handsontable htRowHeaders htColumnHeaders" style="height: auto; width: 584px; overflow: hidden;" data-originalstyle="height: 320px; width: 584px; overflow: hidden;"></div>
<br/><br/>
1: Select a cell<br/>
2: Click the focus button <input type="button" id="clickMe" onclick="focusMe()" value="Focus"><br/>
3: <input id="myinput" type="text" placeholder="Type text" /><br/>
CSS
</style><!-- Ugly Hack due to jsFiddle issue -->
<script src="https://docs.handsontable.com/bower_components/handsontable/dist/handsontable.full.js"></script>
<link type="text/css" rel="stylesheet" href="https://docs.handsontable.com/bower_components/handsontable/dist/handsontable.full.min.css">
JavaScript
document.addEventListener("DOMContentLoaded", function() {
var
example = document.getElementById('example1'),
hot1;
function focusMe(e){
alert("hi");
setTimeout(function() {
example = document.getElementById('myInput')
example.focus();
}, 2000);
}
hot1 = new Handsontable(example,{
data: Handsontable.helper.createSpreadsheetData(5, 5),
rowHeaders: true,
colHeaders: true
});
});