mirror of
https://github.com/status-im/react-native.git
synced 2025-01-27 09:45:04 +00:00
RN: Fix Reponder Logic in Text
Summary: Fixes a bug I accidentally introduced in the responder logic for `Text`. I forgot that I was using arrow functions to preserve `context` while still relying on the creation of `arguments`. Oops. Differential Revision: D8077595 fbshipit-source-id: 1f7dc11ea90ca4d6bb2129823ba09c79fb5a32b0
This commit is contained in:
parent
7c5845a5a2
commit
e2ce22b823
@ -167,25 +167,25 @@ class TouchableText extends React.Component<Props, State> {
|
||||
onResponderGrant: (event: SyntheticEvent<>, dispatchID: string): void => {
|
||||
nullthrows(this.touchableHandleResponderGrant)(event, dispatchID);
|
||||
if (this.props.onResponderGrant != null) {
|
||||
this.props.onResponderGrant.apply(this, arguments);
|
||||
this.props.onResponderGrant.call(this, event, dispatchID);
|
||||
}
|
||||
},
|
||||
onResponderMove: (event: SyntheticEvent<>): void => {
|
||||
nullthrows(this.touchableHandleResponderMove)(event);
|
||||
if (this.props.onResponderMove != null) {
|
||||
this.props.onResponderMove.apply(this, arguments);
|
||||
this.props.onResponderMove.call(this, event);
|
||||
}
|
||||
},
|
||||
onResponderRelease: (event: SyntheticEvent<>): void => {
|
||||
nullthrows(this.touchableHandleResponderRelease)(event);
|
||||
if (this.props.onResponderRelease != null) {
|
||||
this.props.onResponderRelease.apply(this, arguments);
|
||||
this.props.onResponderRelease.call(this, event);
|
||||
}
|
||||
},
|
||||
onResponderTerminate: (event: SyntheticEvent<>): void => {
|
||||
nullthrows(this.touchableHandleResponderTerminate)(event);
|
||||
if (this.props.onResponderTerminate != null) {
|
||||
this.props.onResponderTerminate.apply(this, arguments);
|
||||
this.props.onResponderTerminate.call(this, event);
|
||||
}
|
||||
},
|
||||
onResponderTerminationRequest: (): boolean => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user