From 8f9aed9f58f2b683ff85efc278f657e7d0abd9dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Sat, 5 Sep 2026 19:17:04 +0300 Subject: [PATCH] fix(ui): dropdown enhancement itself hides the form's submit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The → no-script submit used to disappear via a :has([data-dd-done]) rule — one indirection too many (a soft swap onto a new build can leave the page on its old in-memory stylesheet, which then keeps the arrows and drops the chevron). The enhancement now hides the sibling submit with an owned inline style at the moment it runs, so the state travels with the DOM, not the cascade. --- crates/in-web/src/dropdown.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/in-web/src/dropdown.rs b/crates/in-web/src/dropdown.rs index 97c71af..7b9f698 100644 --- a/crates/in-web/src/dropdown.rs +++ b/crates/in-web/src/dropdown.rs @@ -187,6 +187,16 @@ pub async fn dropdown_script(cx: &Cx) -> Result { window.__inAdded(trigger);\ select.parentNode.insertBefore(trigger, select);\ window.__inOwn(select, ['dd-native'], []);\ + /* The form's own submit only serves the no-script path; once \ + the select is enhanced it duplicates the autosubmit, so it \ + bows out — directly, not via a stylesheet the skin or a \ + morph might out-race. */ \ + var go = null; \ + var sibs = select.parentNode.children; \ + for (var si = 0; si < sibs.length; si++) { \ + if (sibs[si].tagName === 'BUTTON' && sibs[si].type === 'submit' && !sibs[si].classList.contains('dd-trigger')) { go = sibs[si]; break; } \ + } \ + if (go) { window.__inOwn(go, [], ['style']); go.style.display = 'none'; } \ var panel = document.createElement('div');\ panel.className = 'dd-panel';\ panel.setAttribute('role', 'listbox');\