From 74066647c65466d3db18b42c073eab34cf3a6e94 Mon Sep 17 00:00:00 2001 From: seefo Date: Tue, 13 Jun 2017 18:01:53 -0700 Subject: [PATCH] Resolved FB4958 --- domain-server/resources/web/settings/js/settings.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/domain-server/resources/web/settings/js/settings.js b/domain-server/resources/web/settings/js/settings.js index 8066223318..39628ebb11 100644 --- a/domain-server/resources/web/settings/js/settings.js +++ b/domain-server/resources/web/settings/js/settings.js @@ -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')) {