From 6788e74ca488b2ec83d6c5574220663959cc8669 Mon Sep 17 00:00:00 2001 From: Anatoly Piskunov Date: Tue, 1 Sep 2026 16:38:12 +0200 Subject: [PATCH] fix(api-frontend): keep focus in current input when adding new row Remove automatic .focus() call in addMultiRow() that jumped focus to the newly created input. Now the new row is appended but focus stays in the input where the user is typing. --- api-frontend/app.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/api-frontend/app.js b/api-frontend/app.js index 5dadd380..f0a3d590 100644 --- a/api-frontend/app.js +++ b/api-frontend/app.js @@ -690,9 +690,7 @@ function addMultiRow(wrap) { div.innerHTML = renderMultiRow(paramName, caption, idx, '', idx + 1); wrap.appendChild(div.firstElementChild); updateRemoveButtons(wrap); - // Focus new input - const newInput = wrap.querySelector('.multi-input-row:last-child .mi-input'); - if (newInput) newInput.focus(); + updatePlaceholders(wrap); } function updateRemoveButtons(wrap) {