mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-01 18:15:13 +00:00
@@ -432,6 +432,15 @@ const PanResponder = {
|
|||||||
|
|
||||||
onMoveShouldSetResponderCapture(event: PressEvent): boolean {
|
onMoveShouldSetResponderCapture(event: PressEvent): boolean {
|
||||||
const touchHistory = event.touchHistory;
|
const touchHistory = event.touchHistory;
|
||||||
|
// Responder system incorrectly dispatches should* to current responder
|
||||||
|
// Filter out any touch moves past the first one - we would have
|
||||||
|
// already processed multi-touch geometry during the first event.
|
||||||
|
if (
|
||||||
|
gestureState._accountsForMovesUpTo ===
|
||||||
|
touchHistory.mostRecentTimeStamp
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
PanResponder._updateGestureStateOnMove(gestureState, touchHistory);
|
PanResponder._updateGestureStateOnMove(gestureState, touchHistory);
|
||||||
return config.onMoveShouldSetPanResponderCapture
|
return config.onMoveShouldSetPanResponderCapture
|
||||||
? config.onMoveShouldSetPanResponderCapture(event, gestureState)
|
? config.onMoveShouldSetPanResponderCapture(event, gestureState)
|
||||||
@@ -489,6 +498,14 @@ const PanResponder = {
|
|||||||
|
|
||||||
onResponderMove(event: PressEvent): void {
|
onResponderMove(event: PressEvent): void {
|
||||||
const touchHistory = event.touchHistory;
|
const touchHistory = event.touchHistory;
|
||||||
|
// Guard against the dispatch of two touch moves when there are two
|
||||||
|
// simultaneously changed touches.
|
||||||
|
if (
|
||||||
|
gestureState._accountsForMovesUpTo ===
|
||||||
|
touchHistory.mostRecentTimeStamp
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Filter out any touch moves past the first one - we would have
|
// Filter out any touch moves past the first one - we would have
|
||||||
// already processed multi-touch geometry during the first event.
|
// already processed multi-touch geometry during the first event.
|
||||||
PanResponder._updateGestureStateOnMove(gestureState, touchHistory);
|
PanResponder._updateGestureStateOnMove(gestureState, touchHistory);
|
||||||
|
|||||||
Reference in New Issue
Block a user