Skip to content

Commit f8d0f22

Browse files
authored
ui: ensure auto-scroll stops correctly near target (#36686)
ensure auto-scroll stops correctly near target
1 parent 0a0fadb commit f8d0f22

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

system/ui/lib/scroll_panel2.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def _update_state(self, bounds_size: float, content_size: float) -> None:
8888
# Steady once we are close enough to the target
8989
if abs(dist) < 1 and abs(self._velocity) < MIN_VELOCITY:
9090
self.set_offset(target)
91+
self._velocity = 0.0
9192
self._state = ScrollState.STEADY
9293

9394
elif abs(self._velocity) < MIN_VELOCITY:

0 commit comments

Comments
 (0)