Skip to content

Commit

Permalink
Merge pull request #1910 from tarkah/fix/scrollable-scroll-wheel
Browse files Browse the repository at this point in the history
Only scroll w/ wheel if over scrollable
  • Loading branch information
hecrj authored Jun 13, 2023
2 parents 60cd864 + 38da953 commit 329fbc7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions widget/src/scrollable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 (?)
Expand Down

0 comments on commit 329fbc7

Please sign in to comment.