Bug 258415

Summary: REGRESSION (iOS 17 beta): Custom UITextField / inputView broken on WKWebView form elements
Product: WebKit Reporter: Ali Juma <ajuma>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED MOVED    
Severity: Normal CC: cdumez, justincohen, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Sample project none

Description Ali Juma 2023-06-22 12:40:10 PDT
Created attachment 466800 [details]
Sample project

Steps to reproduce (also see the attached sample project):
1. Setup a WKWebView to use a UITableView as its inputView.
2. Open a web form with multiple fields. The sample project uses https://rsolomakhin.github.io/autofill/ but any html form with multiple inputs will work.
3. Tap on a field to trigger the inputView on the WKWebView.
4. Navigate between fields using the input accessory view.

Expected behavior:
The UITableView is visible at all times as the inputView of the WKWebView.

Actual behavior:
The UITableView is displayed the first time a field is focused but disappears when navigating to the next field, then it's visible again, and so on. This is breaking the autofill UI in Chrome on iOS.

It's unclear if this is a WebKit bug (e.g., a regression from bug 254236) or a bug in UIKit, given the large changes in iOS17 pulling the keyboard out-of-process.

This bug is also filed as FB12419714.
Comment 1 Wenson Hsieh 2023-06-22 12:41:28 PDT
rdar://111175269
Comment 2 Wenson Hsieh 2023-07-11 12:44:49 PDT
FYI, the change in 261964@main went into iOS 16.5.1, where the problem doesn't repro. I suspect this is due to system changes.
Comment 3 Wenson Hsieh 2023-07-13 08:57:42 PDT
Fixing this in a system component (UIKit).