1212'use strict' ;
1313
1414const EdgeInsetsPropType = require ( 'EdgeInsetsPropType' ) ;
15- const NativeMethodsMixin = require ( 'NativeMethodsMixin' ) ;
1615const React = require ( 'React' ) ;
1716const PropTypes = require ( 'prop-types' ) ;
1817/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error
@@ -46,7 +45,7 @@ const PRESS_RETENTION_OFFSET = {top: 20, left: 20, right: 20, bottom: 30};
4645 */
4746const TouchableWithoutFeedback = createReactClass ( {
4847 displayName : 'TouchableWithoutFeedback' ,
49- mixins : [ NativeMethodsMixin , TimerMixin , Touchable . Mixin ] ,
48+ mixins : [ TimerMixin , Touchable . Mixin ] ,
5049
5150 propTypes : {
5251 accessible : PropTypes . bool ,
@@ -160,7 +159,8 @@ const TouchableWithoutFeedback = createReactClass({
160159 } ,
161160
162161 touchableGetLongPressDelayMS : function ( ) : number {
163- return this . props . delayLongPress ! = null ? this . props . delayLongPress : 500 ;
162+ return this . props . delayLongPress = = = 0 ? 0 :
163+ this . props . delayLongPress || 500 ;
164164 } ,
165165
166166 touchableGetPressOutDelayMS : function ( ) : number {
@@ -184,8 +184,7 @@ const TouchableWithoutFeedback = createReactClass({
184184 const style = ( Touchable . TOUCH_TARGET_DEBUG && child . type && child . type . displayName === 'Text' ) ?
185185 [ child . props . style , { color : 'red' } ] :
186186 child . props . style ;
187-
188- return React . cloneElement ( child , {
187+ return ( React : any ) . cloneElement ( child , {
189188 accessible : this . props . accessible !== false ,
190189 accessibilityLabel : this . props . accessibilityLabel ,
191190 accessibilityComponentType : this . props . accessibilityComponentType ,
@@ -194,7 +193,6 @@ const TouchableWithoutFeedback = createReactClass({
194193 testID : this . props . testID ,
195194 onLayout : this . props . onLayout ,
196195 hitSlop : this . props . hitSlop ,
197- ...child . props ,
198196 onStartShouldSetResponder : this . touchableHandleStartShouldSetResponder ,
199197 onResponderTerminationRequest : this . touchableHandleResponderTerminationRequest ,
200198 onResponderGrant : this . touchableHandleResponderGrant ,
0 commit comments