mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-26 20:04:15 +03:00
Stop propagation when deploying the context menu for a project panel entry (#3965)
This PR fixes an issue where right-click on any project panel entry would cause the context menu on the root of the project panel (introduced in #3954) to deploy. We need to stop propagation in the handler on the inner project panel list items so that the click event doesn't bubble up the tree. Release Notes: - Fixed an issue where the project panel was always deploying the root context menu rather than on the clicked item.
This commit is contained in:
parent
6982b4b42e
commit
c40a7f3445
@ -1433,6 +1433,9 @@ impl ProjectPanel {
|
||||
}))
|
||||
.on_secondary_mouse_down(cx.listener(
|
||||
move |this, event: &MouseDownEvent, cx| {
|
||||
// Stop propagation to prevent the catch-all context menu for the project
|
||||
// panel from being deployed.
|
||||
cx.stop_propagation();
|
||||
this.deploy_context_menu(event.position, entry_id, cx);
|
||||
},
|
||||
)),
|
||||
|
Loading…
Reference in New Issue
Block a user