diff --git a/cookbook/templates/forms/edit_internal_recipe.html b/cookbook/templates/forms/edit_internal_recipe.html index 35292f2c7..b1333b3c0 100644 --- a/cookbook/templates/forms/edit_internal_recipe.html +++ b/cookbook/templates/forms/edit_internal_recipe.html @@ -182,7 +182,7 @@ }); // load initial value - $('#id_ingredients').val(JSON.stringify(data)) + $('#id_ingredients').val(JSON.stringify(data)); function addIngredientRow() { data.push({ @@ -193,6 +193,9 @@ id: Math.floor(Math.random() * 10000000), delete: false, }); + input = table.rowManager.rows[((table.rowManager.rows).length) - 1].cells[1].getElement() + input.focus(); + input.select(); } document.onkeyup = function (e) {