From 8f92185e5e7de1111221115cf00742ff23451509 Mon Sep 17 00:00:00 2001 From: Michael Winter Date: Mon, 20 Apr 2026 17:56:53 +0200 Subject: [PATCH] Add Go To index input field --- webapp/path_navigator.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/webapp/path_navigator.html b/webapp/path_navigator.html index fb777d3..bf7eb8f 100644 --- a/webapp/path_navigator.html +++ b/webapp/path_navigator.html @@ -372,6 +372,7 @@ Index: 0 / 0 + @@ -1229,6 +1230,19 @@ } }); + // Go to index on Enter + document.getElementById("gotoIndex").addEventListener("keydown", (e) => { + if (e.key === "Enter") { + const idx = parseInt(e.target.value); + if (!isNaN(idx) && idx >= 0 && idx <= totalSteps) { + currentIndex = idx; + panToIndex(currentIndex); + updateUI(); + } + e.target.value = ''; + } + }); + function updateChordPanel(elementId, data) { const container = document.getElementById(elementId); container.innerHTML = "";