Skip to content

Commit

Permalink
update TouchAction::Click condition
Browse files Browse the repository at this point in the history
Signed-off-by: Bi Fuguo <1782765876@qq.com>
  • Loading branch information
kongbai1996 committed Jan 9, 2025
1 parent a79e413 commit e9e96cf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions components/compositing/touch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,11 @@ impl TouchHandler {
unreachable!("On touchup received, but already flinging.")
},
WaitingForScript => {
self.state = Nothing;
TouchAction::Click
if self.active_touch_points.is_empty() {
self.state = Nothing;
return TouchAction::Click;
}
TouchAction::NoAction
},
DefaultPrevented | MultiTouch => {
if self.active_touch_points.is_empty() {
Expand Down

0 comments on commit e9e96cf

Please sign in to comment.