Skip to content

Commit

Permalink
Avoid dragging scroll area when touching scrollbars for Scrollable
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Jan 8, 2023
1 parent f64e95e commit 2d00747
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion native/src/widget/scrollable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,10 @@ pub fn update<Message>(

return event::Status::Captured;
}
Event::Touch(event) => {
Event::Touch(event)
if state.scroll_area_touched_at.is_some()
|| !mouse_over_y_scrollbar && !mouse_over_x_scrollbar =>
{
match event {
touch::Event::FingerPressed { .. } => {
state.scroll_area_touched_at = Some(cursor_position);
Expand Down

0 comments on commit 2d00747

Please sign in to comment.