question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

onResponderGrant called before onResponderTerminate

See original GitHub issue

When a responder captures the active responder, it seems that onResponderTerminate is not called until after onResponderGrant. This seems like the wrong thing to do. Are there reasons for this behavior?

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:18 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
jordwalkecommented, Mar 10, 2016

I still don’t know about the original intent of the diff:

onResponderReject will be called after the native View has already intercepted the touch.

Why is this true? And why are we looking at the return value of onResponderGrant? If something wants the gesture lock, shouldn’t it always block native gestures? I’d say so.

0reactions
gaearoncommented, Nov 21, 2017

I just closed https://github.com/facebook/react/pull/6218 because it got stale again. If it is still relevant please submit a new PR (e.g. based on that one) and provide instructions to test the new behavior.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gesture Responder System - React Native
The gesture responder system manages the lifecycle of gestures in your app. A touch can go through several phases as the app determines...
Read more >
Interactions // React Native for Web
These callbacks are always bookended by onResponderGrant (before) and either onResponderRelease or onResponderTerminate (after).
Read more >
Maintain Touchable Items with a Parent PanResponder in ...
In that case onResponderGrant will be called, then onResponderMove ... on the active PanResponder if it returns true then onResponderTerminate is called.
Read more >
Trying to swipe away items in react-native FlatList but not ...
There is a library called https://github.com/gitboss2000/react-native-swipeable-flat-list. i hope it could work better for you, ...
Read more >
2.5 Events · react-native training
7.1.1 JS call OC; 7.1.2 OC call JS; 7.1.3 Native View Component. 7.2 Android. 7.2.1 JS call Java ... handleMoveShouldSetResponder} onResponderGrant={this.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found