Skip to content

Commit

Permalink
fix click event when long time in touchstart
Browse files Browse the repository at this point in the history
Signed-off-by: kongbai1996 <1782765876@qq.com>
  • Loading branch information
kongbai1996 committed Jan 2, 2025
1 parent 3c40a48 commit 14aa860
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/compositing/touch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,11 @@ impl TouchHandler {
Flinging { .. } => {
unreachable!("On touchup received, but already flinging.")
},
WaitingForScript | DefaultPrevented | MultiTouch => {
WaitingForScript => {
self.state = Nothing;
TouchAction::Click
},
DefaultPrevented | MultiTouch => {
if self.active_touch_points.is_empty() {
self.state = Nothing;
}
Expand Down

0 comments on commit 14aa860

Please sign in to comment.