Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

ui: Change scrollbar hitbox insertion (#40008)

Finn Eversd4b5bb9f173d
diff --git a/crates/ui/src/components/scrollbar.rs b/crates/ui/src/components/scrollbar.rs
index d85ef8f506d..bfcaa93eb41 100644
--- a/crates/ui/src/components/scrollbar.rs
+++ b/crates/ui/src/components/scrollbar.rs
@@ -1102,7 +1102,6 @@ impl<T: ScrollableHandle> Element for ScrollbarElement<T> {
.disabled()
.not()
.then(|| ScrollbarPrepaintState {
- parent_bounds_hitbox: window.insert_hitbox(bounds, HitboxBehavior::Normal),
thumbs: {
let thumb_ranges = self.state.read(cx).thumb_ranges().collect::<Vec<_>>();
let width = self.state.read(cx).width.to_pixels();
@@ -1178,6 +1177,7 @@ impl<T: ScrollableHandle> Element for ScrollbarElement<T> {
})
.collect()
},
+ parent_bounds_hitbox: window.insert_hitbox(bounds, HitboxBehavior::Normal),
});
if prepaint_state
.as_ref()