[UIWebView/WKWebView/Safari] Allow keyboard appearance (type, appearance, return key style) to be configured

Originator:radexpl
Number:rdar://27762975 Date Originated:09-Aug-2016 12:12 PM
Status:Open Resolved:
Product:iOS SDK Product Version:
Classification:Feature (New) Reproducible:Not Applicable
 
Summary:

With web views of all sorts on iOS, there are very few opportunities to configure the keyboard appearance so that it matches the expected behavior of a web app.

It is possible, for example, to configure an input as <input type=email> causing the keyboard to switch to “email address” type (showing “@“, “.” signs). However, it isn’t possible to change it to the “Twitter” type (with “@“ and “#” keys), nor is it possible to configure the return key style (to “Go”, “Next”, etc.”), or the appearance (dark style).

Proposed solution:

The most universal solution would be to allow configuration using HTML or CSS. This way, the keyboard configuration would be respected on Safari, UIWebView, and WKWebView.

For example, to configure the keyboard type for `UIKeyboardType.twitter`, one could say:

<input type=“-apple-twitter”>

Or perhaps a better solution would be to use CSS, this way the type=“” attribute would be more backwards-compatible:

<input type=“text” style=“-apple-keyboard-type: twitter; -apple-keyboard-appearance: dark; -apple-return-key-type: next”>

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!