use ui::scroll::{self, Axes};
div().relative()
.child(scroll::pane("log", Axes::Vertical).size_full().track_scroll(&self.scroll).child(rows))
.child(scroll::follow(&self.scroll, &self.follow))
.child(scroll::scrollbar("log-bar", &self.scroll, &self.bar))
// jump to latest, shown while !self.follow.following()
self.follow.follow();followgoes beside the scrollbar, over the same container, andFollowStateis a field on the view. It starts pinned.- Scrolling up releases the pin and scrolling back to the end restores it; there is no gesture to wire.
- The correction lands one frame after the content grows.