From d4b5bb9f173d78d5795387269edc68f979024898 Mon Sep 17 00:00:00 2001 From: Finn Evers Date: Sat, 11 Oct 2025 12:00:03 +0200 Subject: [PATCH] ui: Change scrollbar hitbox insertion (#40008) Closes #39974 Since the thumb hitboxes themselves do not propagate events, we need to paint the normal parent hitbox on top of the other ones. This also caused hover detection to fail, which caused the issue linked. Release Notes: - Fixed an issue where hovering scrollbars in hovers would dismiss these. --- crates/ui/src/components/scrollbar.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ui/src/components/scrollbar.rs b/crates/ui/src/components/scrollbar.rs index d85ef8f506..bfcaa93eb4 100644 --- a/crates/ui/src/components/scrollbar.rs +++ b/crates/ui/src/components/scrollbar.rs @@ -1102,7 +1102,6 @@ impl Element for ScrollbarElement { .disabled() .not() .then(|| ScrollbarPrepaintState { - parent_bounds_hitbox: window.insert_hitbox(bounds, HitboxBehavior::Normal), thumbs: { let thumb_ranges = self.state.read(cx).thumb_ranges().collect::>(); let width = self.state.read(cx).width.to_pixels(); @@ -1178,6 +1177,7 @@ impl Element for ScrollbarElement { }) .collect() }, + parent_bounds_hitbox: window.insert_hitbox(bounds, HitboxBehavior::Normal), }); if prepaint_state .as_ref()