react-native/Libraries
Luke Dubert ca2fb70fa9 Fix: swiping in navigator too quickly causes the gesture to be lost
Summary:**Issue:**

In the Navigator if a user attempts to navigate backwards (or forwards) through the route stack by swiping and they perform the gesture too quickly, the gesture is lost and nothing happens.

**Cause:**

In the `_matchGestureAction` function, the variable `moveStartedInRegion` is created and evaluates the gesture to determine if it was initiated in a valid region, (a.k.a. within the `edgeHitWidth`). The issue arises because `moveStartedInRegion` uses `currentLoc` (which is created from `gestureState.moveX`/`Y`) and when the gesture is performed using a flick of the finger, the first value of the `currentLoc` is outside of the `edgeHitWidth`.

**Solution:**

The solution is to track the coordinates of the initial grant (`gestureState.x0`/`y0`), and use that value instead of the `currentLoc` when evaluating `moveStartedInRegion`. The `currentLoc` is still needed however, for when the gestureState does not have a an initial x and y value, because the pan responder has not been granted.
Closes https://github.com/facebook/react-native/pull/6249

Differential Revision: D3168726

Pulled By: ericvicenti

fb-gh-sync-id: f2ac462e59bdc38536b99cac6a4877c99fa4e869
fbshipit-source-id: f2ac462e59bdc38536b99cac6a4877c99fa4e869
2016-04-12 11:08:23 -07:00
..
ART Implement clipping rectangle for ReactNativeART 2016-04-11 19:19:17 -07:00
ActionSheetIOS CHORE - Remove Trailing Spaces 2016-04-06 09:21:53 -07:00
AdSupport Text highlighting on iOS 2015-07-24 08:41:58 -08:00
Animated JS tests. 2016-04-07 01:27:20 -07:00
AppRegistry Update FBSource to use Flow 0.22 2016-03-08 12:39:29 -08:00
AppState Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
AppStateIOS Updating AppState to support the inactive state. 2016-03-10 08:30:24 -08:00
BatchedBridge Make object properties in NativeModules configurable. 2016-04-11 07:57:28 -07:00
CameraRoll fix warning about async CameraRoll.getPhotos 2016-03-18 10:21:23 -07:00
Components Add null check before accessing the refresh control ref 2016-04-12 01:27:18 -07:00
CustomComponents Fix: swiping in navigator too quickly causes the gesture to be lost 2016-04-12 11:08:23 -07:00
DebugComponentHierarchy Decouple Module System from Native Calls 2015-12-08 16:03:37 -08:00
Device Decouple Module System from Native Calls 2015-12-08 16:03:37 -08:00
Devtools Increase RN devtools retry timeout 2016-04-01 07:02:25 -07:00
Experimental Fix up this pattern var React = require('react-native'); 2016-04-08 20:37:22 -07:00
Fetch Reject promise if network request failed 2016-03-08 16:37:24 -08:00
Geolocation Geolocation Accuracy and Cached Location Bug 2016-03-08 05:17:21 -08:00
Image CHORE - Remove Trailing Spaces 2016-04-06 09:21:53 -07:00
Inspector Fix perf tab missing key warnings 2016-04-07 23:38:32 -07:00
Interaction Better Incremental/TaskQueue error reporting 2016-04-05 02:35:22 -07:00
JavaScriptAppEngine Setup RCTNativeAppEventEmitter on init 2016-03-15 03:45:33 -07:00
LayoutAnimation Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
Linking Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
LinkingIOS Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
Modal Make 'onRequestClose' a required prop for Modal on Android. Fixes #6612 2016-03-26 10:24:24 -07:00
NativeApp Decouple Module System from Native Calls 2015-12-08 16:03:37 -08:00
NavigationExperimental Fix up this pattern var React = require('react-native'); 2016-04-08 20:37:22 -07:00
Network Add support for missing XHR response types 2016-04-11 05:54:28 -07:00
Picker Add position to Picker onValueChange's call 2016-02-19 06:50:33 -08:00
Portal React.findNodeHandle -> ReactNative.findNodeHandle 2016-04-07 19:44:31 -07:00
PullToRefresh Deprecate PullToRefreshViewAndroid and remove it from the website 2016-02-21 16:17:36 -08:00
PushNotificationIOS Updated documentation of local notifications for PushNotificationIOS addEventListener() 2016-04-01 09:56:24 -07:00
QuickPerformanceLogger added QPL for main interactions 2015-09-29 22:25:23 -07:00
RCTTest CHORE - Remove Trailing Spaces 2016-04-06 09:21:53 -07:00
RKBackendNode Wrapped UIManager native module for better abstraction 2015-11-27 07:00:32 -08:00
ReactIOS React.findNodeHandle -> ReactNative.findNodeHandle 2016-04-07 19:44:31 -07:00
ReactNative Prefix warning module with fbjs/lib/ 2016-04-09 13:24:28 -07:00
Sample Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
Settings Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
Storage Update AsyncStorage.js 2016-04-10 18:02:20 -07:00
StyleSheet Add a missing parenthese 2016-03-30 10:04:54 -07:00
Text Import css-layout measure mode changes from pull request #163 2016-04-12 07:02:29 -07:00
Utilities Add support for missing XHR response types 2016-04-11 05:54:28 -07:00
Vibration Add support for vibration patterns 2016-03-29 21:45:20 -07:00
WebSocket Added support for JavaScript third-party debuggers 2016-04-07 13:15:58 -07:00
react-native Add deprecation warnings to ReactNative.addons 2016-04-11 18:20:28 -07:00
vendor Fix breakages caused by switch to fbjs 2016-03-02 08:26:33 -08:00
Promise.js Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
promiseRejectionIsError.js Add possibility to `console.error`/redbox on promise rejections 2016-03-15 05:22:22 -07:00