mirror of
https://github.com/zed-industries/zed.git
synced 2024-09-19 02:17:35 +03:00
Fix scrolling sticking to top (#13874)
The problem seemingly was that scrolling only started after autoscroll has finished. I have added a function to forcefully stop it, which I call when scroll event happens Release Notes: - Fixed delay when changing scrolling direction (#13720) --------- Co-authored-by: Piotr <piotr@zed.dev>
This commit is contained in:
parent
275dd3fa81
commit
2a97aad273
@ -3660,6 +3660,11 @@ impl EditorElement {
|
||||
if scroll_position != current_scroll_position {
|
||||
editor.scroll(scroll_position, axis, cx);
|
||||
cx.stop_propagation();
|
||||
} else if y < 0. {
|
||||
// Due to clamping, we may fail to detect cases of overscroll to the top;
|
||||
// We want the scroll manager to get an update in such cases and detect the change of direction
|
||||
// on the next frame.
|
||||
cx.notify();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user