Basic description: I have a modal dialog that appears with two UITextFields with their content types set correctly for autofill, the keyboard appears on textfield focus, with the iOS autofill prompt. The autofill action sheet appears, and I select the correctly identified credential, the action sheet dismisses, returning my app to the foreground, yet the credentials are not entered into the text fields until the user manually focuses them, at which point the system keyboard is re-shown and the credentials are entered correctly.
Environment:
- Xcode 11.3
- iOS Sim 13.3 (problem was originally reported from a physical device with 13.3)
- Using PanModal from Slack (https://github.com/slackhq/PanModal) with some customizations added to handle keyboard showing and presenting vc animations (https://github.com/mgray88/PanModal/tree/toc.1)
- Text fields are custom subclasses of UITextField
- Scene support is explicitly disabled
Strange error message reported in the console, which excessive amount of Googling has not yielded any answers:
Keyboard cannot present view controllers (attempted to present <UIKeyboardHiddenViewController_Autofill: 0x7fe5d37bd640>)- This appears upon selecting the Autofill button on the keyboard toolbar
- Followed by
textFieldShouldEndEditingandtextFieldCanResignFirstResponder, which is to be expected - The autofill action sheet presents, and I select the desired credentials
- Action sheet dismisses, returning focus to the app
At this point, the credentials should have been entered into the text fields
- HOWEVER, the credentials are not entered into the text fields until the user manually selects one of them
- None of the text field delegate methods are fired until manual focus
- None of the first responder methods are fired
Example project which demonstrates this issue: https://github.com/mgray88/AutofillTest