Merge pull request #1910 from tarkah/fix/scrollable-scroll-wheel

Only scroll w/ wheel if over scrollable
This commit is contained in:
Héctor Ramón 2023-06-13 03:37:57 +02:00 committed by GitHub
commit 329fbc7b21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 (?)