From 743760be8700e7b76e4c17f62165547a7673b13e Mon Sep 17 00:00:00 2001 From: "gcp-cherry-pick-bot[bot]" <98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 09:59:07 +0100 Subject: [PATCH] Automatically create a hitbox for focusable elements (cherry-pick #9485) (#9486) Cherry-picked Automatically create a hitbox for focusable elements (#9485) Closes #9462 This fixes the focus story in the storybook. Release Notes: - N/A 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 7e50fee8564d38d679584d32d58bde18b41c5ad6..5cc0c70bd54334b85888a05fc28ac5e7a40b7960 100644 --- a/crates/gpui/src/elements/div.rs +++ b/crates/gpui/src/elements/div.rs @@ -1307,6 +1307,7 @@ impl Interactivity { || self.has_hover_styles() || self.has_mouse_listeners() || self.scroll_offset.is_some() + || self.tracked_focus_handle.is_some() { Some(cx.insert_hitbox(bounds, self.occlude_mouse)) } else {