mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Fixed the problem that touchmove cannot be disabled when preventDefault is invoked on touchstart. (#36200)
Signed-off-by: kongbai1996 <1782765876@qq.com>
This commit is contained in:
parent
95c3033456
commit
53f7c7b1de
1 changed files with 7 additions and 5 deletions
|
@ -574,11 +574,13 @@ impl WebView {
|
||||||
self.touch_handler
|
self.touch_handler
|
||||||
.set_handling_touch_move(self.touch_handler.current_sequence_id, false);
|
.set_handling_touch_move(self.touch_handler.current_sequence_id, false);
|
||||||
if let Some(info) = self.touch_handler.get_touch_sequence_mut(sequence_id) {
|
if let Some(info) = self.touch_handler.get_touch_sequence_mut(sequence_id) {
|
||||||
info.prevent_move = TouchMoveAllowed::Allowed;
|
if info.prevent_move == TouchMoveAllowed::Pending {
|
||||||
if let TouchSequenceState::PendingFling { velocity, cursor } =
|
info.prevent_move = TouchMoveAllowed::Allowed;
|
||||||
info.state
|
if let TouchSequenceState::PendingFling { velocity, cursor } =
|
||||||
{
|
info.state
|
||||||
info.state = TouchSequenceState::Flinging { velocity, cursor }
|
{
|
||||||
|
info.state = TouchSequenceState::Flinging { velocity, cursor }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue