diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 4a70283cc3..de024d86fc 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -5538,7 +5538,9 @@ impl EditorElement { editor.scroll_manager.show_scrollbars(window, cx); cx.stop_propagation(); - } else if let Some((layout, axis)) = scrollbars_layout.get_hovered_axis(window) + } else if let Some((layout, axis)) = scrollbars_layout + .get_hovered_axis(window) + .filter(|_| !event.dragging()) { if layout .thumb_bounds diff --git a/crates/editor/src/scroll.rs b/crates/editor/src/scroll.rs index 368ad8cf87..e03ee55e61 100644 --- a/crates/editor/src/scroll.rs +++ b/crates/editor/src/scroll.rs @@ -374,6 +374,7 @@ impl ScrollManager { pub fn dragging_scrollbar_axis(&self) -> Option { self.active_scrollbar .as_ref() + .filter(|scrollbar| scrollbar.thumb_state == ScrollbarThumbState::Dragging) .map(|scrollbar| scrollbar.axis) }