Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Unified Diff: ios/chrome/browser/ui/autofill/card_unmask_prompt_view_bridge.mm

Issue 2955243002: [Autofill] Fixes a bug with the CardUnmaskPromptViewController. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/autofill/card_unmask_prompt_view_bridge.mm
diff --git a/ios/chrome/browser/ui/autofill/card_unmask_prompt_view_bridge.mm b/ios/chrome/browser/ui/autofill/card_unmask_prompt_view_bridge.mm
index 89ca46d3b855fdbbe2d1745bebbab9399820e7ff..50476970667f9f4ff6bf34a070516aa800c3f4a1 100644
--- a/ios/chrome/browser/ui/autofill/card_unmask_prompt_view_bridge.mm
+++ b/ios/chrome/browser/ui/autofill/card_unmask_prompt_view_bridge.mm
@@ -206,11 +206,14 @@ void CardUnmaskPromptViewBridge::DeleteSelf() {
- (void)viewWillLayoutSubviews {
[super viewWillLayoutSubviews];
- NSIndexPath* CVCIndexPath =
- [self.collectionViewModel indexPathForItem:_CVCItem];
- CVCCell* CVC = base::mac::ObjCCastStrict<CVCCell>(
- [self.collectionView cellForItemAtIndexPath:CVCIndexPath]);
- [self focusInputIfNeeded:CVC];
+ if ([self.collectionViewModel hasItemForItemType:ItemTypeCVC
+ sectionIdentifier:SectionIdentifierMain]) {
+ NSIndexPath* CVCIndexPath =
+ [self.collectionViewModel indexPathForItem:_CVCItem];
+ CVCCell* CVC = base::mac::ObjCCastStrict<CVCCell>(
+ [self.collectionView cellForItemAtIndexPath:CVCIndexPath]);
+ [self focusInputIfNeeded:CVC];
+ }
}
#pragma mark - CollectionViewController
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698