react-native/Libraries/CustomComponents/Navigator
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
..
Navigation nested emit call in a queue should be handled in FIFO 2016-03-03 18:57:52 -08:00
Navigator.js Fix: swiping in navigator too quickly causes the gesture to be lost 2016-04-12 11:08:23 -07:00
NavigatorBreadcrumbNavigationBar.js Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
NavigatorBreadcrumbNavigationBarStyles.android.js Export per-platform NavigatorNavigationBarStyles for consistent styling 2015-10-10 15:32:46 -07:00
NavigatorBreadcrumbNavigationBarStyles.ios.js fix navigator lint warnings 2015-11-30 19:31:30 -08:00
NavigatorNavigationBar.js Ignore Navigator touch events for background buttons 2016-04-05 11:33:27 -07:00
NavigatorNavigationBarStylesAndroid.js Export per-platform NavigatorNavigationBarStyles for consistent styling 2015-10-10 15:32:46 -07:00
NavigatorNavigationBarStylesIOS.js Fix Navigator.NavigationBar Title interactivity 2015-12-15 12:02:27 -08:00
NavigatorSceneConfigs.js FloatFromLeft scene configuration fixed. HorizontalSwipeJumpFromRight… 2015-12-16 15:08:44 -08:00