From 509a7bd8955138b2ff864dd75059d397b3fbb31e Mon Sep 17 00:00:00 2001 From: FivePixels Date: Mon, 25 Apr 2022 20:43:42 -0500 Subject: Fix bug in create add row, add logic to 'done' a row when both inputs are filled --- app/static/js/create.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/static/js/create.js') diff --git a/app/static/js/create.js b/app/static/js/create.js index cb22ad8..b65bc5a 100644 --- a/app/static/js/create.js +++ b/app/static/js/create.js @@ -2,7 +2,7 @@ var rowsDiv = document.getElementById("rows"); var rowId = rowsDiv.children.length; function handleAdd() { - newRow = rowsDiv.children[1].cloneNode(true); + newRow = rowsDiv.children[0].cloneNode(true); exerciseNameInput = newRow.children[0].children[0].children[0].children[0]; exerciseNameInput.value = ''; -- cgit v1.2.3