Bug 189432 - [iOS] Make WKWebView become the first responder to support testing key presses to non-editable elements
Summary: [iOS] Make WKWebView become the first responder to support testing key presse...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: iPhone / iPad iOS 11
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords: InRadar
Depends on:
Blocks: 190571 189389
  Show dependency treegraph
 
Reported: 2018-09-07 14:12 PDT by Daniel Bates
Modified: 2018-10-14 22:02 PDT (History)
8 users (show)

See Also:


Attachments
Patch and layout test (16.78 KB, patch)
2018-09-07 14:22 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2018-09-07 14:12:16 PDT
It is not possible to simulate hardware keyboard key presses outside of a content-editable element. We should support this.
Comment 1 Daniel Bates 2018-09-07 14:22:32 PDT
Created attachment 349190 [details]
Patch and layout test
Comment 2 Simon Fraser (smfr) 2018-09-07 15:58:34 PDT
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?
Comment 3 Daniel Bates 2018-09-07 16:07:04 PDT
(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 4 Daniel Bates 2018-09-10 13:55:28 PDT
Comment on attachment 349190 [details]
Patch and layout test

Clearing flags on attachment: 349190

Committed r235858: <https://trac.webkit.org/changeset/235858>
Comment 5 Daniel Bates 2018-09-10 13:55:29 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2018-09-10 13:56:28 PDT
<rdar://problem/44316037>