mirror of
https://github.com/status-im/react-native.git
synced 2025-02-24 15:18:10 +00:00
Summary: This diff fixes a bug in Touchable and Pressability where a long delay setting would unwillingly trigger presses by the user. The cause of this bug is that we were not calculating the responder region until _after_ the delay. If you were to lift up outside of the press rect _before_ we calculate the responder region, we wouldn't be able to calculate that you're outside of the region (i.e. never transitioned to an "out" state) and would register the press The fix is to start the calculation as soon as you transition into the initial state, so the calculation is available by the time we need to check if you're in an out state Reviewed By: TheSavior Differential Revision: D13412934 fbshipit-source-id: 55d1c2a9e70d4e3ce268f92075d7d09dd842a81e