Conversation
…HandleResponderMove
Generated by 🚫 dangerJS |
|
That super nice. I encountred the same issue just 2 weeks ago (as it was preventing apple validation on some device) and I was trying to find the cause in native which did not works (RCTConvert correctly convert incomplete hitslop). Now it makes sense since the part of the touch handling is handle in JS (so happy to learn that). That make it it crystal clear why the native component did seems to receive the touch (touchable opacity got the touched opacity) but nothing changed on JS. I think 0 is the good default. |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@Taylor123 merged commit f6d3a61 into |
Summary: Experienced a `TouchableOpacity` releasing the `PanResponder` without invoking `onPress` due to a missing a direction key in the `hitSlop` prop; The missing key caused the corresponding pressExpand to become NaN which causes `isTouchWithinActive` to become falsey, when it should be truthy. If defaulting to 0 is undesired behavior, I'm happy to take a different approach. Pull Request resolved: #22281 Differential Revision: D13374335 Pulled By: cpojer fbshipit-source-id: f9d28e51b9d9c45aed42bea2df3d844a799fa827
Summary: Experienced a `TouchableOpacity` releasing the `PanResponder` without invoking `onPress` due to a missing a direction key in the `hitSlop` prop; The missing key caused the corresponding pressExpand to become NaN which causes `isTouchWithinActive` to become falsey, when it should be truthy. If defaulting to 0 is undesired behavior, I'm happy to take a different approach. Pull Request resolved: facebook/react-native#22281 Differential Revision: D13374335 Pulled By: cpojer fbshipit-source-id: f9d28e51b9d9c45aed42bea2df3d844a799fa827
Motiviation
Experienced a
TouchableOpacityreleasing thePanResponderwithout invokingonPressdue to a missing a direction key in thehitSlopprop; The missing key caused the corresponding pressExpand to become NaN which causesisTouchWithinActiveto become falsey, when it should be truthy.If defaulting to 0 is undesired behavior, I'm happy to take a different approach.
Test Plan:
Used local version of react-native within the application as well as running existing test suite.
New tests don't seem necessary based on the added code.
Changelog:
[General] [Fixed] - Fix unexpected responder release by defaulting hitSlop object values to 0 within touchableHandleResponderMove