diff --git a/crates/story/src/scrollable_story.rs b/crates/story/src/scrollable_story.rs index fd4ca2ab..eceb1103 100644 --- a/crates/story/src/scrollable_story.rs +++ b/crates/story/src/scrollable_story.rs @@ -202,7 +202,7 @@ impl Render for ScrollableStory { .gap_4() .child(self.render_buttons(cx)) .child( - div().w_full().flex_1().child( + div().w_full().flex_1().min_h_64().child( div().relative().size_full().child( v_flex() .id("test-0") diff --git a/crates/ui/src/scroll/scrollbar.rs b/crates/ui/src/scroll/scrollbar.rs index 3fa3bdc3..75087246 100644 --- a/crates/ui/src/scroll/scrollbar.rs +++ b/crates/ui/src/scroll/scrollbar.rs @@ -132,8 +132,10 @@ impl ScrollbarState { fn with_hovered_on_thumb(&self, axis: Option) -> Self { let mut state = *self; state.hovered_on_thumb = axis; - if axis.is_some() { - state.last_scroll_time = Some(std::time::Instant::now()); + if self.is_scrollbar_visible() { + if axis.is_some() { + state.last_scroll_time = Some(std::time::Instant::now()); + } } state }