[UIWebView] Keyboard events not delivered the web view outside of focused inputs

Originator:radexpl
Number:rdar://27764172 Date Originated:09-Aug-2016 02:21 PM
Status:Open Resolved:
Product:iOS Product Version:10.0b4, 9.3
Classification:UI/Usability Reproducible:Always
 
Summary:

When a web page opened in UIWebView has configured keyboard events (many websites such as GitHub or Facebook have one-letter keyboard shortcuts for navigation; or basic keys like arrows, escape, ⌘Enter for navigating on lists, accepting selection, closing views), they don’t respond at all to keypresses on a connected keyboard.

Keyboard events work only in the context of a focused input (with an open keyboard). No keyboard = events don’t get delivered.

Steps to Reproduce:

1. Open a website with a keyboard shortcut set up and press it
 - for example, go to github.com and press `?`

Expected Results:

A keyboard shortcut is triggered (for github, a help view is displayed)

Actual Results:

Nothing happens

Regression:

This is only true for UIWebView (and possibly WKWebView, unsure), but not for Safari. If you go through those same steps in MobileSafari, the keyboard shortcuts *will* be triggered

Notes:

With iPad Smart Keyboard, and all around iOS getting more serious about productivity, keyboard shortcuts are becoming more and more important, so now’s a great time to patch this bug! :)

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!