Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
git_ui: Fix commit modal dismiss on commit menu click (#28744)
Smit Barmasecfc848d24b34
diff --git a/crates/git_ui/src/commit_modal.rs b/crates/git_ui/src/commit_modal.rsindex c90e0deade3..d7a11e53ba3 100644--- a/crates/git_ui/src/commit_modal.rs+++ b/crates/git_ui/src/commit_modal.rs@@ -62,6 +62,7 @@ pub struct CommitModal {restore_dock: RestoreDock,properties: ModalContainerProperties,branch_list_handle: PopoverMenuHandle<BranchList>,+ commit_menu_handle: PopoverMenuHandle<ContextMenu>,}impl Focusable for CommitModal {@@ -171,7 +172,9 @@ impl CommitModal {let focus_handle = commit_editor.focus_handle(cx);cx.on_focus_out(&focus_handle, window, |this, _, window, cx| {- if !this.branch_list_handle.is_focused(window, cx) {+ if !this.branch_list_handle.is_focused(window, cx)+ && !this.commit_menu_handle.is_focused(window, cx)+ {cx.emit(DismissEvent);}})@@ -185,6 +188,7 @@ impl CommitModal {restore_dock,properties,branch_list_handle: PopoverMenuHandle::default(),+ commit_menu_handle: PopoverMenuHandle::default(),}}@@ -246,6 +250,7 @@ impl CommitModal {.action("Amend...", Amend.boxed_clone())}))})+ .with_handle(self.commit_menu_handle.clone()).anchor(Corner::TopRight)}