| Index: ios/chrome/browser/autofill/form_input_accessory_view_controller.mm
|
| diff --git a/ios/chrome/browser/autofill/form_input_accessory_view_controller.mm b/ios/chrome/browser/autofill/form_input_accessory_view_controller.mm
|
| index 8bb148f937fc6e473b4e68215a8899bbc62f100a..e628cc9d6b6a0800894cc490fd01e7a57f370e49 100644
|
| --- a/ios/chrome/browser/autofill/form_input_accessory_view_controller.mm
|
| +++ b/ios/chrome/browser/autofill/form_input_accessory_view_controller.mm
|
| @@ -290,17 +290,25 @@ bool ComputeFramesOfKeyboardParts(UIView* inputAccessoryView,
|
| // so we attach the custom view directly to the keyboard view instead.
|
| [_customAccessoryView removeFromSuperview];
|
|
|
| - // If the keyboard isn't visible or no suggestions have been triggered yet,
|
| - // don't show the custom view.
|
| - int numSuggestions =
|
| - [[static_cast<FormSuggestionView*>(view) suggestions] count];
|
| + // If the keyboard isn't visible don't show the custom view.
|
| if (CGRectIntersection([UIScreen mainScreen].bounds, _keyboardFrame)
|
| .size.height == 0 ||
|
| - CGRectEqualToRect(_keyboardFrame, CGRectZero) ||
|
| - (!_suggestionsHaveBeenShown && numSuggestions == 0)) {
|
| + CGRectEqualToRect(_keyboardFrame, CGRectZero)) {
|
| _customAccessoryView.reset();
|
| return;
|
| }
|
| +
|
| + // If this is a form suggestion view and no suggestions have been triggered
|
| + // yet, don't show the custom view.
|
| + FormSuggestionView* formSuggestionView =
|
| + base::mac::ObjCCastStrict<FormSuggestionView>(view);
|
| + if (formSuggestionView) {
|
| + int numSuggestions = [[formSuggestionView suggestions] count];
|
| + if (!_suggestionsHaveBeenShown && numSuggestions == 0) {
|
| + _customAccessoryView.reset();
|
| + return;
|
| + }
|
| + }
|
| _suggestionsHaveBeenShown = YES;
|
|
|
| CGFloat height = autofill::kInputAccessoryHeight;
|
|
|