From f66d2fcc54b278d463ce0d0a0dc03d614933648d Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 17 Nov 2026 03:49:58 +0000 Subject: [PATCH] Popup bodies keep no scroll of their own: their lists scroll themselves --- crates/ui-contract/src/contract/overlay/ui.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/ui-contract/src/contract/overlay/ui.rs b/crates/ui-contract/src/contract/overlay/ui.rs index 4468c1975..7d7ed2fa0 100644 --- a/crates/ui-contract/src/contract/overlay/ui.rs +++ b/crates/ui-contract/src/contract/overlay/ui.rs @@ -106,11 +106,13 @@ impl<'a> OverlayUi<'a> { forget_layer(self.ctx, popup.id, owner); return None; } - // A popup with no opener hangs from the owner's rect, which the container's layer reads as a rect anchor. + // A popup with no opener hangs from the owner's rect, which the container's layer reads as a rect anchor. Its + // body does not scroll: a list in it (a menu's, a dropdown's) scrolls itself within the room. let overlay = match (&overlay.opener, &overlay.place) { (None, Place::Anchored { anchor: Anchor::Response, .. }) => overlay.anchor(Anchor::Rect(self.anchor)), _ => overlay, - }; + } + .body_scroll(false); let label = self.resolved.label_value.clone(); let props = ContainerProps::new().surface(SurfaceKind::Popup).pad(POPUP_PAD).mount(Mount::Layer(overlay)); let container = PopupBody { common: Common::new(), props: ContainerProps { owner: Some(owner), ..props } }.label(label);