Merge pull request #2906 from lmaxyz/master
Fix scrollable scrolling by touch
This commit is contained in:
commit
45aecccfe5
1 changed files with 5 additions and 7 deletions
|
|
@ -876,18 +876,16 @@ where
|
||||||
}
|
}
|
||||||
Event::Touch(event)
|
Event::Touch(event)
|
||||||
if state.scroll_area_touched_at.is_some()
|
if state.scroll_area_touched_at.is_some()
|
||||||
|| !mouse_over_y_scrollbar
|
|| (!mouse_over_y_scrollbar
|
||||||
&& !mouse_over_x_scrollbar =>
|
&& !mouse_over_x_scrollbar) =>
|
||||||
{
|
{
|
||||||
match event {
|
match event {
|
||||||
touch::Event::FingerPressed { .. } => {
|
touch::Event::FingerPressed { .. } => {
|
||||||
let Some(cursor_position) = cursor.position()
|
if cursor_over_scrollable.is_none() {
|
||||||
else {
|
|
||||||
return;
|
return;
|
||||||
};
|
}
|
||||||
|
|
||||||
state.scroll_area_touched_at =
|
state.scroll_area_touched_at = cursor.position();
|
||||||
Some(cursor_position);
|
|
||||||
}
|
}
|
||||||
touch::Event::FingerMoved { .. } => {
|
touch::Event::FingerMoved { .. } => {
|
||||||
if let Some(scroll_box_touched_at) =
|
if let Some(scroll_box_touched_at) =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue