Avoid dragging scroll area when touching scrollbars for Scrollable
This commit is contained in:
parent
f64e95e246
commit
2d007474dd
1 changed files with 4 additions and 1 deletions
|
|
@ -516,7 +516,10 @@ pub fn update<Message>(
|
||||||
|
|
||||||
return event::Status::Captured;
|
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 {
|
match event {
|
||||||
touch::Event::FingerPressed { .. } => {
|
touch::Event::FingerPressed { .. } => {
|
||||||
state.scroll_area_touched_at = Some(cursor_position);
|
state.scroll_area_touched_at = Some(cursor_position);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue