fix keyboard behaviour for category tables

This commit is contained in:
Stephen Birarda 2017-01-31 11:05:57 -08:00
parent 1474f22fd7
commit 79cb0ba074

View file

@ -216,8 +216,8 @@ $(document).ready(function(){
sibling = sibling.next();
}
if (sibling.hasClass(Settings.ADD_DEL_BUTTONS_CLASS)) {
sibling.find('.' + Settings.ADD_ROW_BUTTON_CLASS).click();
// for tables with categories we add the entry and setup the new row on enter
if (sibling.find("." + Settings.ADD_CATEGORY_BUTTON_CLASS).length) {
sibling.find("." + Settings.ADD_CATEGORY_BUTTON_CLASS).click();
// set focus to the first input in the new row