| Index: ios/chrome/browser/ui/side_swipe_gesture_recognizer.mm
|
| diff --git a/ios/chrome/browser/ui/side_swipe_gesture_recognizer.mm b/ios/chrome/browser/ui/side_swipe_gesture_recognizer.mm
|
| index 72f608c76ab89627b019f2e872de700a1cd1958f..b4a463a9db0983458cd7896a51bb9c76617e3f58 100644
|
| --- a/ios/chrome/browser/ui/side_swipe_gesture_recognizer.mm
|
| +++ b/ios/chrome/browser/ui/side_swipe_gesture_recognizer.mm
|
| @@ -47,6 +47,7 @@ const CGFloat kDefaultMinSwipeXThreshold = 4;
|
|
|
| UITouch* touch = [[event allTouches] anyObject];
|
| CGPoint location = [touch locationInView:self.view];
|
| + _startPoint = CGPointZero;
|
| if (_swipeEdge > 0) {
|
| if (location.x > _swipeEdge &&
|
| location.x < CGRectGetMaxX([self.view bounds]) - _swipeEdge) {
|
| @@ -78,6 +79,16 @@ const CGFloat kDefaultMinSwipeXThreshold = 4;
|
| return;
|
| }
|
|
|
| + // In iOS10, sometimes a PanGestureRecognizer will fire a touchesMoved even
|
| + // after touchesBegan sets its state to |UIGestureRecognizerStateFailed|.
|
| + // Somehow the state is re-set to UIGestureRecognizerStatePossible, and ends
|
| + // up in moved. Checking if |_startPoint| has been set is a secondary way to
|
| + // catch for failed gestures.
|
| + if (CGPointEqualToPoint(_startPoint, CGPointZero)) {
|
| + self.state = UIGestureRecognizerStateFailed;
|
| + return;
|
| + }
|
| +
|
| // Don't swipe at an angle greater than |kMaxSwipeYAngle|.
|
| UITouch* touch = [[event allTouches] anyObject];
|
| CGPoint currentPoint = [touch locationInView:self.view];
|
|
|