From f937d233a9495fcb9ad0a0439b913a89b7ad7535 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 9 Sep 2026 17:31:54 +0300 Subject: [PATCH] =?UTF-8?q?the=20share=20modal=20keeps=20its=20height=20wh?= =?UTF-8?q?ile=20the=20people=20filter=20types:=20the=20first=20keystroke?= =?UTF-8?q?=20on=20the=20picker=20now=20floors=20the=20panel=20at=20its=20?= =?UTF-8?q?full=20unfiltered=20height,=20because=20the=20rows=20the=20filt?= =?UTF-8?q?er=20hides=20were=20shrinking=20the=20panel=20=E2=80=94=20and?= =?UTF-8?q?=20the=20modal=20under=20it=20=E2=80=94=20with=20every=20letter?= =?UTF-8?q?,=20jumping=20everything=20below;=20clearing=20the=20filter=20r?= =?UTF-8?q?eturns=20exactly=20that=20height,=20a=20panel=20reborn=20throug?= =?UTF-8?q?h=20a=20morph=20re-render=20locks=20anew=20at=20its=20own=20mea?= =?UTF-8?q?sure,=20and=20the=20no-script=20page=20(no=20filter,=20no=20loc?= =?UTF-8?q?k)=20is=20untouched?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/in-web/src/share.rs | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/crates/in-web/src/share.rs b/crates/in-web/src/share.rs index a117dfa..a050fce 100644 --- a/crates/in-web/src/share.rs +++ b/crates/in-web/src/share.rs @@ -441,8 +441,7 @@ async fn remint_link(cx: &Cx, Form(input): Form) -> Redirect { // creation seals its own; a failed seal is lived // with, because the redirect below shows the full // address regardless. - let sealed = - in_core::store::secret::seal(&app(cx).link_key, &minted.token); + let sealed = in_core::store::secret::seal(&app(cx).link_key, &minted.token); let _ = app(cx) .store .set_setting(&format!("share_token:{}", minted.link.id), &sealed) @@ -1003,14 +1002,7 @@ async fn download_bytes( HeaderValue::from_static("private, no-cache"), ); let Some(parts) = - crate::files::bytes_response( - store, - file_id, - size_bytes, - range, - headers, - ) - .await + crate::files::bytes_response(store, file_id, size_bytes, range, headers).await else { return dead_link(cx).await; }; @@ -1851,9 +1843,13 @@ pub(crate) async fn share_copy_script(cx: &Cx) -> Result { /// and address — and hides itself down to the Everyone row when no filter /// word matches. The same field carries the no-script typed-address post, /// so on submit it is benched whenever rows are checked: its half-typed -/// text must not ride beside them. Delegated listeners only, idempotent -/// across the modal's re-renders (`window.__inSharePick` guards it), so the -/// `in:wire` morph needs no per-element re-init. +/// text must not ride beside them. The first keystroke also locks the +/// panel at its full, unfiltered height — the rows the filter hides would +/// otherwise shrink the modal under it, jumping everything below with +/// every letter — and a panel reborn through a morph re-render locks +/// anew. Delegated listeners only, idempotent across the modal's +/// re-renders (`window.__inSharePick` guards it), so the `in:wire` morph +/// needs no per-element re-init. pub(crate) async fn share_pick_script(cx: &Cx) -> Result { use topcoat::view::Unescaped; const JS: &str = "\ @@ -1878,6 +1874,7 @@ pub(crate) async fn share_pick_script(cx: &Cx) -> Result { if (!t || !t.classList || !t.classList.contains('share-pick-filter')) { return; } \ var box = t.closest('.share-picker'); \ if (!box) { return; } \ + if (!box.style.minHeight) { box.style.minHeight = box.getBoundingClientRect().height + 'px'; } \ var needle = t.value.trim().toLowerCase(); \ var shown = 0; \ pickRows(box).forEach(function (row) { \