Commit 8eb1f98c authored by sczs's avatar sczs Committed by Commit Bot

[ios] Stops cancelling gestures in presented Infobar Modal.

This tap gesture was preventing the TableView from recognizing some
delegate callback like didSelectRow. Setting cancelsTouchesInView
to NO "forwards" the touch to the TableView successfully.

Bug: 1018341
Change-Id: I249e6795b47d67c168eaf574dfdb765ee1bd6d38
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1911480Reviewed-by: default avatarChris Lu <thegreenfrog@chromium.org>
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714529}
parent 1d267524
...@@ -25,9 +25,14 @@ const CGFloat kContainerCornerRadius = 13.0; ...@@ -25,9 +25,14 @@ const CGFloat kContainerCornerRadius = 13.0;
@implementation InfobarModalPresentationController @implementation InfobarModalPresentationController
- (void)presentationTransitionWillBegin { - (void)presentationTransitionWillBegin {
// Add a gesture recognizer to endEditing (thus hiding the keyboard) if a user
// taps outside the keyboard while one its being presented. Set
// cancelsTouchesInView to NO so the presented Modal can handle the gesture as
// well. (e.g. Selecting a row in a TableViewController.)
UITapGestureRecognizer* tap = UITapGestureRecognizer* tap =
[[UITapGestureRecognizer alloc] initWithTarget:self.presentedView [[UITapGestureRecognizer alloc] initWithTarget:self.presentedView
action:@selector(endEditing:)]; action:@selector(endEditing:)];
tap.cancelsTouchesInView = NO;
[self.containerView addGestureRecognizer:tap]; [self.containerView addGestureRecognizer:tap];
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment