Bug 213149 - [iPadOS] Focusing selects and color inputs should not bring up the software keyboard
Summary: [iPadOS] Focusing selects and color inputs should not bring up the software k...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
: 213835 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-06-12 14:35 PDT by Wenson Hsieh
Modified: 2020-07-01 22:31 PDT (History)
7 users (show)

See Also:


Attachments
Patch (5.68 KB, patch)
2020-06-12 15:09 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
v2 (6.16 KB, patch)
2020-06-12 17:02 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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. ***