jump to input for next row after enter on previous row

This commit is contained in:
Stephen Birarda 2014-10-09 15:12:42 -07:00
parent a6c5f4308a
commit ee36b6b91a

View file

@ -109,11 +109,13 @@ $(document).ready(function(){
sibling = $(this).parent('td').next();
if (sibling.hasClass(Settings.DATA_COL_CLASS)) {
// jump to that input
// set focus to next input
sibling.find('input').focus()
} else if (sibling.hasClass(Settings.TABLE_BUTTONS_CLASS)) {
sibling.find('.' + Settings.ADD_ROW_BUTTON_CLASS).click()
$(this).blur()
// set focus to the first input in the new row
$(this).closest('table').find('tr.inputs input:first').focus()
}
}
});