From 2d62837877e14fa369a9ae598d49ac011a8fe6b4 Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Thu, 26 Mar 2026 15:37:28 -0300 Subject: [PATCH] sidebar: Ensure the projects menu is dismissed (#52494) --- crates/recent_projects/src/sidebar_recent_projects.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/recent_projects/src/sidebar_recent_projects.rs b/crates/recent_projects/src/sidebar_recent_projects.rs index bef88557b12aa076658799ff0c08518c68b6e729..72006cf6b769d23e4d2e4d535d33b61c605bad8c 100644 --- a/crates/recent_projects/src/sidebar_recent_projects.rs +++ b/crates/recent_projects/src/sidebar_recent_projects.rs @@ -403,8 +403,8 @@ impl PickerDelegate for SidebarRecentProjectsDelegate { Some( v_flex() - .flex_1() .p_1p5() + .flex_1() .gap_1() .border_t_1() .border_color(cx.theme().colors().border_variant) @@ -414,9 +414,10 @@ impl PickerDelegate for SidebarRecentProjectsDelegate { }; Button::new("open_local_folder", "Add Local Project") .key_binding(KeyBinding::for_action_in(&open_action, &focus_handle, cx)) - .on_click(move |_, window, cx| { + .on_click(cx.listener(move |_, _, window, cx| { + cx.emit(DismissEvent); window.dispatch_action(open_action.boxed_clone(), cx) - }) + })) }) .into_any(), )