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:
Tim Yung 2018-05-21 12:00:01 -07:00 committed by Facebook Github Bot
parent 7c5845a5a2
commit e2ce22b823

View File

@ -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 => {