Bug 213149

Summary: [iPadOS] Focusing selects and color inputs should not bring up the software keyboard
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: HTML EditingAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, darin, megan_gardner, thorton, tim.brust, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
v2 none

Description Wenson Hsieh 2020-06-12 14:35:54 PDT
SSIA
Comment 1 Radar WebKit Bug Importer 2020-06-12 14:36:13 PDT
<rdar://problem/64312450>
Comment 2 Wenson Hsieh 2020-06-12 15:09:00 PDT
Created attachment 401792 [details]
Patch
Comment 3 Darin Adler 2020-06-12 16:28:24 PDT
Comment on attachment 401792 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=401792&action=review

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:1932
> +        return !WebKit::currentUserInterfaceIdiomIsPad();

This changes the behavior for read-only <input type=select> and <input type=color> on iPhone. They will now return true. Is this what we want?
Comment 4 Wenson Hsieh 2020-06-12 16:54:39 PDT
Comment on attachment 401792 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=401792&action=review

>> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:1932
>> +        return !WebKit::currentUserInterfaceIdiomIsPad();
> 
> This changes the behavior for read-only <input type=select> and <input type=color> on iPhone. They will now return true. Is this what we want?

(I assume you mean <select> and <input type=color>)

This patch will make us match shipping behavior, but it does seem strange that we would allow the keyboard to be presented on iPhone for readonly color inputs. (Note that it doesn't change behavior for select elements, since the readonly attribute does not apply to select elements).

We probably do want to avoid showing any input view for readonly color inputs on iPhone though, so while I'm here I'll preserve that behavior. But this does highlight another issue, which is that on iPad, the `readonly` attribute doesn't prevent us from mutating form controls that show a popover or context menu (i.e. date, time, color). We probably should address this in a separate followup.
Comment 5 Wenson Hsieh 2020-06-12 17:02:13 PDT
Created attachment 401807 [details]
v2
Comment 6 Wenson Hsieh 2020-06-12 17:31:52 PDT
Thanks for the review!

(I filed https://bugs.webkit.org/show_bug.cgi?id=213159 to track the followup I mentioned above)
Comment 7 EWS 2020-06-12 19:01:48 PDT
Committed r262993: <https://trac.webkit.org/changeset/262993>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 401807 [details].
Comment 8 Wenson Hsieh 2020-07-01 22:31:25 PDT
*** Bug 213835 has been marked as a duplicate of this bug. ***