From 96c9ce811a7bbd3287b668adf726923e600414f0 Mon Sep 17 00:00:00 2001 From: Spencer Ahrens Date: Wed, 9 Dec 2015 17:16:29 -0800 Subject: [PATCH] Fix Text + TouchableWithoutFeedback Summary: Arrow functions don't have `arguments`...whoops :( public Reviewed By: vjeux, ericvicenti Differential Revision: D2741448 fb-gh-sync-id: 15e9fb0446909e4cbbbb5e30024dde58d872e725 --- Libraries/Text/Text.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Libraries/Text/Text.js b/Libraries/Text/Text.js index 69dc800de..8d9f68fba 100644 --- a/Libraries/Text/Text.js +++ b/Libraries/Text/Text.js @@ -181,35 +181,35 @@ const Text = React.createClass({ } return setResponder; }, - onResponderGrant: (e: SyntheticEvent, dispatchID: string) => { + onResponderGrant: function(e: SyntheticEvent, dispatchID: string) { this.touchableHandleResponderGrant(e, dispatchID); this.props.onResponderGrant && this.props.onResponderGrant.apply(this, arguments); - }, - onResponderMove: (e: SyntheticEvent) => { + }.bind(this), + onResponderMove: function(e: SyntheticEvent) { this.touchableHandleResponderMove(e); this.props.onResponderMove && this.props.onResponderMove.apply(this, arguments); - }, - onResponderRelease: (e: SyntheticEvent) => { + }.bind(this), + onResponderRelease: function(e: SyntheticEvent) { this.touchableHandleResponderRelease(e); this.props.onResponderRelease && this.props.onResponderRelease.apply(this, arguments); - }, - onResponderTerminate: (e: SyntheticEvent) => { + }.bind(this), + onResponderTerminate: function(e: SyntheticEvent) { this.touchableHandleResponderTerminate(e); this.props.onResponderTerminate && this.props.onResponderTerminate.apply(this, arguments); - }, - onResponderTerminationRequest: (): bool => { + }.bind(this), + onResponderTerminationRequest: function(): bool { // Allow touchable or props.onResponderTerminationRequest to deny // the request var allowTermination = this.touchableHandleResponderTerminationRequest(); if (allowTermination && this.props.onResponderTerminationRequest) { - allowTermination = this.props.onResponderTerminationRequest(); + allowTermination = this.props.onResponderTerminationRequest.apply(this, arguments); } return allowTermination; - }, + }.bind(this), }; } newProps = {