diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 89ddf3cd01..c82d5a4b82 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -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(); } }); }