Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PanResponder doesn’t work correctly with Force Touch #6922

Closed
dmitrykuznetsovdev opened this issue Apr 11, 2016 · 1 comment
Closed

PanResponder doesn’t work correctly with Force Touch #6922

dmitrykuznetsovdev opened this issue Apr 11, 2016 · 1 comment
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@dmitrykuznetsovdev
Copy link

Hello,
Thank you very much for React Native. But unfortunately I found a following issue.
The component has two behaviour at once time - swipe to left/right and touch press.

<TouchableOpacity
  activeOpacity={ 0.75 }
  style={styles.item}
  onPress={this._onPressCard}>

This component is placing at Animated.View element:

<Animated.View style={[styles.card, animatedCardStyles]}
  {...this._panResponder.panHandlers}>
  
   <ExampleCard 
       navigator={this.props.navigator}
 
       item={items}
  
       styleText={styles.cardText}
    
       onPressCard={this._onPressCard}/>

</Animated.View>

It works fine with iPhone 5.
But iPhone 6S+ has a force touch feature and when I try to touch a screen harder the event handler is not executing when I assign _panResponder.panHandlers.
But everything is working good if I remove it.

How I create panHandlers:

PanResponder.create({
  
  onMoveShouldSetResponderCapture: () => true,
  
  onMoveShouldSetPanResponderCapture: () => true,
  
  onPanResponderGrant: ()=>{},
  
  onPanResponderMove: ()=>{},
  
  onPanResponderRelease: ()=>{}

})
@dmitrykuznetsovdev
Copy link
Author

#3082

@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

2 participants