From 2d007474dd002dfc936f75f7379f1bbae72c5ad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Sun, 8 Jan 2023 20:27:15 +0100 Subject: [PATCH] Avoid dragging scroll area when touching scrollbars for `Scrollable` --- native/src/widget/scrollable.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/native/src/widget/scrollable.rs b/native/src/widget/scrollable.rs index 46b757b9e2..822860364d 100644 --- a/native/src/widget/scrollable.rs +++ b/native/src/widget/scrollable.rs @@ -516,7 +516,10 @@ pub fn update( 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);