fix: don't capture all mouse events

This commit is contained in:
Hojjat 2026-03-23 17:57:58 -06:00 committed by Ashley Wulber
parent 3e4a2b24e6
commit 6ea24b8518

View file

@ -1226,7 +1226,9 @@ where
}
Event::Mouse(MouseEvent::ButtonReleased(Button::Left)) => {
state.dragging = None;
shell.capture_event();
if cursor_position.position_in(layout.bounds()).is_some() {
shell.capture_event();
}
if let Some(on_auto_scroll) = &self.on_auto_scroll {
shell.publish(on_auto_scroll(None));
}