Commit 0c48b7b7 authored by David Jean's avatar David Jean Committed by Commit Bot

[ios] Always remove keyboard on password search edit

Bug: 885088
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Change-Id: I5d11b0b736b1b040674aef1911ca8a9510e9402c
Reviewed-on: https://chromium-review.googlesource.com/1230676
Commit-Queue: David Jean <djean@chromium.org>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592354}
parent 27fa848f
...@@ -1051,7 +1051,21 @@ blacklistedFormItemWithText:(NSString*)text ...@@ -1051,7 +1051,21 @@ blacklistedFormItemWithText:(NSString*)text
base::mac::ObjCCastStrict<SettingsSearchItem>( base::mac::ObjCCastStrict<SettingsSearchItem>(
[model itemAtIndexPath:itemPath]); [model itemAtIndexPath:itemPath]);
[searchItem setEnabled:enabled]; [searchItem setEnabled:enabled];
[self reconfigureCellsForItems:@[ searchItem ]];
NSIndexPath* indexPath =
[self.collectionViewModel indexPathForItem:searchItem];
MDCCollectionViewCell* cell =
base::mac::ObjCCastStrict<MDCCollectionViewCell>(
[self.collectionView cellForItemAtIndexPath:indexPath]);
// |cell| may be nil if the row is not currently on screen. If that's the case
// and we are disabling we force the keyboard down (since the cell can't do it
// for us).
if (cell) {
[searchItem configureCell:cell];
} else if (!enabled) {
[self.view endEditing:YES];
}
} }
#pragma mark - Testing #pragma mark - Testing
......
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