From 09d75c1e2e0e2bbfa0a22e63b1a8d56c3dc8a1a9 Mon Sep 17 00:00:00 2001 From: kisfenyo Date: Tue, 16 Jun 2026 13:01:11 +0200 Subject: [PATCH] =?UTF-8?q?controller:=20fix=20country=20autocomplete=20?= =?UTF-8?q?=E2=80=94=20reveal=20dropdown=20with=20display:block=20(C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Root cause (diagnosed live, not the hypothesised JS throw): filterCountries runs fine and correctly populates the list, but reveals it with `list.style.display=''`. The .geo-country-list CSS default is `display:none` (style.css), so clearing the inline style falls back to none and the populated list never shows — no console error, just an invisible dropdown. Latent since the geo feature's first commit. Fix: reveal with 'block'. Verified live (typing "Német" now lists Németország). Co-Authored-By: Claude Opus 4.8 (1M context) --- controller/internal/web/templates/settings.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/controller/internal/web/templates/settings.html b/controller/internal/web/templates/settings.html index c50ed75..992abf6 100644 --- a/controller/internal/web/templates/settings.html +++ b/controller/internal/web/templates/settings.html @@ -734,7 +734,10 @@ window.__registeredPaths=[{{range .StoragePaths}}{{if .Path}}"{{.Path}}",{{end}} count++; } list.innerHTML = html || '
Nincs találat
'; - list.style.display = count > 0 || q ? '' : 'none'; + // Reveal with 'block', NOT '' — the .geo-country-list CSS default is display:none, + // and clearing the inline style ('') would fall back to that and keep the (populated) + // list hidden. This was the country-autocomplete "no list" bug. + list.style.display = count > 0 || q ? 'block' : 'none'; }; window.addCountry = function(code, name) {