Skip to content

Commit

Permalink
RN: Fix Reponder Logic in Text
Browse files Browse the repository at this point in the history
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
  • Loading branch information
yungsters authored and facebook-github-bot committed May 21, 2018
1 parent 7c5845a commit e2ce22b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Libraries/Text/Text.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit e2ce22b

Please sign in to comment.