Only scroll w/ wheel if over scrollable

This commit is contained in:
Cory Forsstrom 2023-06-12 13:15:11 -07:00
parent 60cd864d43
commit 38da953583
No known key found for this signature in database
GPG key ID: 64D6B5851FFCAC9E

View file

@ -482,6 +482,10 @@ pub fn update<Message>(
match event {
Event::Mouse(mouse::Event::WheelScrolled { delta }) => {
if cursor_over_scrollable.is_none() {
return event::Status::Ignored;
}
let delta = match delta {
mouse::ScrollDelta::Lines { x, y } => {
// TODO: Configurable speed/friction (?)