Commit 99613173 authored by sczs's avatar sczs Committed by Commit Bot

[ios] Ends InfobarModal editing if tapped outside keyboard.

- This will dismiss the Keyboard if the user taps outside of it.
- If the user taps a view that takes a tap gesture (f.e. a button
like Reveal/Hide password) the keyboard will not be dismissed
since this touch will be handled by the view.

Bug: 911864
Change-Id: I74c0e7098c95cb52e42925f647ce485f548bf43f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1627300Reviewed-by: default avatarChris Lu <thegreenfrog@chromium.org>
Reviewed-by: default avatarPeter Lee <pkl@chromium.org>
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#664506}
parent 37414e4b
......@@ -29,6 +29,13 @@ const CGFloat kModalViewVerticalPadding = 20;
@implementation InfobarModalPresentationController
- (void)presentationTransitionWillBegin {
UITapGestureRecognizer* tap =
[[UITapGestureRecognizer alloc] initWithTarget:self.presentedView
action:@selector(endEditing:)];
[self.containerView addGestureRecognizer:tap];
}
- (void)containerViewWillLayoutSubviews {
self.presentedView.frame = [self frameForPresentedView];
......
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