It is not possible to simulate hardware keyboard key presses outside of a content-editable element. We should support this.
Created attachment 349190 [details] Patch and layout test
Comment on attachment 349190 [details] Patch and layout test View in context: https://bugs.webkit.org/attachment.cgi?id=349190&action=review > Tools/ChangeLog:9 > + Make the WKWebView become the first responder immediately without the need to focus an editable > + element. This allows us to test that DOM keyboard events are dispatched to non-editable elements. Does the view become first responder in MobileSafari/SFSafariViewController?
(In reply to Simon Fraser (smfr) from comment #2) > Comment on attachment 349190 [details] > Patch and layout test > > View in context: > https://bugs.webkit.org/attachment.cgi?id=349190&action=review > > > Tools/ChangeLog:9 > > + Make the WKWebView become the first responder immediately without the need to focus an editable > > + element. This allows us to test that DOM keyboard events are dispatched to non-editable elements. > > Does the view become first responder in MobileSafari/SFSafariViewController? Yes.
Comment on attachment 349190 [details] Patch and layout test Clearing flags on attachment: 349190 Committed r235858: <https://trac.webkit.org/changeset/235858>
All reviewed patches have been landed. Closing bug.
<rdar://problem/44316037>