Merge pull request #10686 from seefo/fb4958

Resolved FB4958
This commit is contained in:
Stephen Birarda 2017-06-14 11:14:37 -07:00 committed by GitHub
commit 1baff8af33

View file

@ -223,6 +223,14 @@ $(document).ready(function(){
// set focus to the first input in the new row
$target.closest('table').find('tr.inputs input:first').focus();
}
var tableRows = sibling.parent();
var tableBody = tableRows.parent();
// if theres no more siblings, we should jump to a new row
if (sibling.next().length == 0 && tableRows.nextAll().length == 1) {
tableBody.find("." + Settings.ADD_ROW_BUTTON_CLASS).click();
}
}
} else if ($target.is('input')) {