scrollbar: Fix scroll to show scrollbar. (#681)
Fix #624 was broke scroll to show behaviors.
This commit is contained in:
parent
581d92378c
commit
6c9a317b3b
2 changed files with 5 additions and 3 deletions
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -132,8 +132,10 @@ impl ScrollbarState {
|
|||
fn with_hovered_on_thumb(&self, axis: Option<ScrollbarAxis>) -> 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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue