Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fire click event only when using left button
Antonio Scandurra0b7072bf67b2
diff --git a/crates/gpui2/src/elements/div.rs b/crates/gpui2/src/elements/div.rsindex 10fd7dda0a4..c27ac52cde3 100644--- a/crates/gpui2/src/elements/div.rs+++ b/crates/gpui2/src/elements/div.rs@@ -964,6 +964,7 @@ impl Interactivity {let interactive_bounds = interactive_bounds.clone();cx.on_mouse_event(move |event: &MouseDownEvent, phase, cx| {if phase == DispatchPhase::Bubble+ && event.button == MouseButton::Left&& interactive_bounds.visibly_contains(&event.position, cx){*pending_mouse_down.borrow_mut() = Some(event.clone());