Automatically create a hitbox for focusable elements (cherry-pick #9485) (#9486)

gcp-cherry-pick-bot[bot] and Antonio Scandurra created

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 <me@as-cii.com>

Change summary

crates/gpui/src/elements/div.rs | 1 +
1 file changed, 1 insertion(+)

Detailed changes

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 {