From 31cd1783a111fa9376686479edb6194e503d32b1 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sat, 15 Aug 2026 08:18:11 +0000 Subject: [PATCH] Sync the ink combobox text as soon as the set's ink list rebuilds. Previously the visible value stayed on the old ink until the box was clicked, because rebuild only copied the select when the input was empty. Co-authored-by: Diaco Soltanpour --- src/xlsx_clean/ui/index.html | 5 ++--- tests/test_ui_assets.py | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xlsx_clean/ui/index.html b/src/xlsx_clean/ui/index.html index b37ef10..72d8d66 100644 --- a/src/xlsx_clean/ui/index.html +++ b/src/xlsx_clean/ui/index.html @@ -207,6 +207,7 @@ select, input { width: 100%; + align-self: stretch; min-height: 54px; padding: 16px 12px; border: 1px solid var(--border-strong); @@ -590,9 +591,7 @@ empty.textContent = "No matches"; empty.hidden = true; panelEl.append(empty); - if (selectEl.value && !inputEl.value) { - inputEl.value = selectEl.value; - } + inputEl.value = selectEl.value || ""; inputDirty = false; syncDisabled(); }; diff --git a/tests/test_ui_assets.py b/tests/test_ui_assets.py index db42f62..db8b3e9 100644 --- a/tests/test_ui_assets.py +++ b/tests/test_ui_assets.py @@ -32,6 +32,7 @@ def test_ui_asset_exists_and_has_required_bridge_content(): "get_inks(setDropdown.value)", "api.create(", "finally", + 'inputEl.value = selectEl.value || ""', ): assert expected in content