zed/crates/editor/src/element
Tim Vermeulen f16101a758
editor: Fix sticky header drag cancels autoscroll (#53592)
In #52636 I seem to have introduced this bug, where mouse-down on a
sticky header followed by an immediate mouse movements sometimes dropped
the pending autoscroll request (to jump to the sticky header line):
1fcf9749a6/crates/editor/src/scroll.rs (L453)

Fixed by exiting early from `mouse_dragged` when
`editor.has_autoscroll_request()`.

What sometimes happened before this fix:


https://github.com/user-attachments/assets/b6dd6650-b5f0-4ea1-ae70-9c4cf69e31a0

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Fixed bug where clicking on a sticky header would sometimes not jump
to that line in the editor
2026-07-24 18:49:53 +00:00
..
header.rs editor: Fix opaque multibuffer header backgrounds not rendering in transparent themes (#61268) 2026-07-20 03:07:34 +00:00
mouse.rs editor: Fix sticky header drag cancels autoscroll (#53592) 2026-07-24 18:49:53 +00:00