Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Insert hitbox when an interactive element can be scrolled (#9216)
Antonio Scandurra0a341261d068
diff --git a/crates/gpui/src/elements/div.rs b/crates/gpui/src/elements/div.rsindex 5b8aab174ab..69929ec8ab6 100644--- a/crates/gpui/src/elements/div.rs+++ b/crates/gpui/src/elements/div.rs@@ -1306,6 +1306,7 @@ impl Interactivity {|| self.group.is_some()|| self.has_hover_styles()|| self.has_mouse_listeners()+ || self.scroll_offset.is_some(){Some(cx.insert_hitbox(bounds, self.occlude_mouse))} else {diff --git a/crates/gpui/src/window/element_cx.rs b/crates/gpui/src/window/element_cx.rsindex 4a30becbe2d..d04a903bdf4 100644--- a/crates/gpui/src/window/element_cx.rs+++ b/crates/gpui/src/window/element_cx.rs@@ -61,7 +61,7 @@ impl HitboxId {/// A rectangular region that potentially blocks hitboxes inserted prior./// See [ElementContext::insert_hitbox] for more details.-#[derive(Clone, Debug, Eq, PartialEq, Deref)]+#[derive(Clone, Debug, Deref)]pub struct Hitbox {/// A unique identifier for the hitboxpub id: HitboxId,