From 327879e05468f312b2e9ed74213c875b4a4ffc08 Mon Sep 17 00:00:00 2001 From: "gcp-cherry-pick-bot[bot]" <98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com> Date: Thu, 14 Mar 2024 09:38:05 +0100 Subject: [PATCH] Fix double-clicking titlebar to zoom (cherry-pick #9323) (#9327) Cherry-picked Fix double-clicking titlebar to zoom (#9323) Fixes https://github.com/zed-industries/zed/issues/9300 This was a regression caused by not inserting a hitbox when a div only had click listeners on it. Release Notes: - Fixed a regression that disabled double-clicking on the titlebar to zoom the window. ([#9300](https://github.com/zed-industries/zed/issues/9300)) (preview-only) Co-authored-by: Antonio Scandurra --- crates/gpui/src/elements/div.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/gpui/src/elements/div.rs b/crates/gpui/src/elements/div.rs index 3b65dfb39bded7ed96568ff32c9e59aa602bc46c..7e50fee8564d38d679584d32d58bde18b41c5ad6 100644 --- a/crates/gpui/src/elements/div.rs +++ b/crates/gpui/src/elements/div.rs @@ -1330,6 +1330,7 @@ impl Interactivity { !self.mouse_up_listeners.is_empty() || !self.mouse_down_listeners.is_empty() || !self.mouse_move_listeners.is_empty() + || !self.click_listeners.is_empty() || !self.scroll_wheel_listeners.is_empty() || self.drag_listener.is_some() || !self.drop_listeners.is_empty()