Merge pull request #2906 from lmaxyz/master

Fix scrollable scrolling by touch
This commit is contained in:
Héctor 2025-11-25 22:01:57 +01:00 committed by GitHub
commit 45aecccfe5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -876,18 +876,16 @@ where
}
Event::Touch(event)
if state.scroll_area_touched_at.is_some()
|| !mouse_over_y_scrollbar
&& !mouse_over_x_scrollbar =>
|| (!mouse_over_y_scrollbar
&& !mouse_over_x_scrollbar) =>
{
match event {
touch::Event::FingerPressed { .. } => {
let Some(cursor_position) = cursor.position()
else {
if cursor_over_scrollable.is_none() {
return;
};
}
state.scroll_area_touched_at =
Some(cursor_position);
state.scroll_area_touched_at = cursor.position();
}
touch::Event::FingerMoved { .. } => {
if let Some(scroll_box_touched_at) =