Skip to content

Commit

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

0 comments on commit a55919a

Please sign in to comment.