From 0dd5fe313b6e44c87885215d3c4d93728d8e1ca5 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Thu, 16 May 2024 18:53:08 -0400 Subject: [PATCH] Revert "Fix aside affecting parent popover height (#11859)" (#11942) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit d3dfa91254f8cbc7f4779463b30a3df1677c395d. This change can cause weird behavior where the completion menu ends up positioned away from the cursor location: Screenshot 2024-05-16 at 6 43 17 PM With the change reverted: Screenshot 2024-05-16 at 6 43 35 PM Release Notes: - Fixed an issue where the completion menu would sometimes appear detached from the cursor location (preview only). --- crates/ui/src/components/popover.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/crates/ui/src/components/popover.rs b/crates/ui/src/components/popover.rs index d71b9028d0fff67f2c84b25c3313e9abd8d0e5ed..b9932eb401a85d8d15010a65d4dacef7fd1f27e8 100644 --- a/crates/ui/src/components/popover.rs +++ b/crates/ui/src/components/popover.rs @@ -40,14 +40,10 @@ pub struct Popover { impl RenderOnce for Popover { fn render(self, cx: &mut WindowContext) -> impl IntoElement { - h_flex() - .items_start() + div() + .flex() .gap_1() - .child( - div() - .flex() - .child(v_flex().elevation_2(cx).px_1().children(self.children)), - ) + .child(v_flex().elevation_2(cx).px_1().children(self.children)) .when_some(self.aside, |this, aside| { this.child( v_flex()