mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
fix click event when long time in touchstart (#34812)
* fix click event when long time in touchstart Signed-off-by: kongbai1996 <1782765876@qq.com> Signed-off-by: Bi Fuguo <1782765876@qq.com> * update TouchAction::Click condition Signed-off-by: Bi Fuguo <1782765876@qq.com> --------- Signed-off-by: kongbai1996 <1782765876@qq.com> Signed-off-by: Bi Fuguo <1782765876@qq.com>
This commit is contained in:
parent
90b41259d2
commit
dd06416ed5
1 changed files with 8 additions and 1 deletions
|
@ -236,7 +236,14 @@ impl TouchHandler {
|
||||||
Flinging { .. } => {
|
Flinging { .. } => {
|
||||||
unreachable!("On touchup received, but already flinging.")
|
unreachable!("On touchup received, but already flinging.")
|
||||||
},
|
},
|
||||||
WaitingForScript | DefaultPrevented | MultiTouch => {
|
WaitingForScript => {
|
||||||
|
if self.active_touch_points.is_empty() {
|
||||||
|
self.state = Nothing;
|
||||||
|
return TouchAction::Click;
|
||||||
|
}
|
||||||
|
TouchAction::NoAction
|
||||||
|
},
|
||||||
|
DefaultPrevented | MultiTouch => {
|
||||||
if self.active_touch_points.is_empty() {
|
if self.active_touch_points.is_empty() {
|
||||||
self.state = Nothing;
|
self.state = Nothing;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue