The choice list's scroll thumb starts a drag with the primary button only

This commit is contained in:
Eric Kaden committed 2026-11-08 21:54:58 -05:00
1 parent ea27cea30f
commit 1930979451
1 file changed
+2 -1
+2 -1
View File
@@ -1201,7 +1201,8 @@ fn scroll_bar(ui: &egui::Ui, track: Rect, shown: usize, n: usize, st: &mut Choic
let thumb = Rect::from_min_size(egui::pos2(trough.min.x, thumb_at(st.first)), vec2(side, thumb_len));
let t = ui.interact(thumb, id.with("thumb"), egui::Sense::drag());
let pointer = ui.input(|i| i.pointer.interact_pos());
if t.drag_started() {
// The primary button only: a right-button drag moves nothing (AGENTS.md "Page presses").
if t.drag_started_by(egui::PointerButton::Primary) {
st.grab = pointer.map(|q| q.y - thumb.min.y);
}
if t.dragged()