mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-03 10:46:19 +00:00
[fix] Avoid retaining DOM nodes in PressResponder
This commit is contained in:
@@ -224,7 +224,6 @@ export default class PressResponder {
|
|||||||
_longPressDispatched: ?boolean = false;
|
_longPressDispatched: ?boolean = false;
|
||||||
_pressDelayTimeout: ?TimeoutID = null;
|
_pressDelayTimeout: ?TimeoutID = null;
|
||||||
_pressOutDelayTimeout: ?TimeoutID = null;
|
_pressOutDelayTimeout: ?TimeoutID = null;
|
||||||
_responder: ?any;
|
|
||||||
_selectionTerminated: ?boolean;
|
_selectionTerminated: ?boolean;
|
||||||
_touchActivatePosition: ?$ReadOnly<{|
|
_touchActivatePosition: ?$ReadOnly<{|
|
||||||
pageX: number,
|
pageX: number,
|
||||||
@@ -266,7 +265,6 @@ export default class PressResponder {
|
|||||||
this._cancelPressOutDelayTimeout();
|
this._cancelPressOutDelayTimeout();
|
||||||
|
|
||||||
this._longPressDispatched = false;
|
this._longPressDispatched = false;
|
||||||
this._responder = event.currentTarget;
|
|
||||||
this._selectionTerminated = false;
|
this._selectionTerminated = false;
|
||||||
this._touchState = NOT_RESPONDER;
|
this._touchState = NOT_RESPONDER;
|
||||||
this._isPointerTouch = event.nativeEvent.type === 'touchstart';
|
this._isPointerTouch = event.nativeEvent.type === 'touchstart';
|
||||||
@@ -430,7 +428,7 @@ export default class PressResponder {
|
|||||||
if (Transitions[prevState] != null) {
|
if (Transitions[prevState] != null) {
|
||||||
nextState = Transitions[prevState][signal];
|
nextState = Transitions[prevState][signal];
|
||||||
}
|
}
|
||||||
if (this._responder == null && signal === RESPONDER_RELEASE) {
|
if (this._touchState === NOT_RESPONDER && signal === RESPONDER_RELEASE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (nextState == null || nextState === ERROR) {
|
if (nextState == null || nextState === ERROR) {
|
||||||
|
|||||||
Reference in New Issue
Block a user