Bug 165664 - WebView doesn't become first responder in element fullscreen.
Summary: WebView doesn't become first responder in element fullscreen.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Mac Unspecified
: P2 Normal
Assignee: Jeremy Jones
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-12-09 11:16 PST by Jeremy Jones
Modified: 2017-11-02 11:37 PDT (History)
5 users (show)

See Also:


Attachments
Patch (2.71 KB, patch)
2016-12-09 11:19 PST, Jeremy Jones
jer.noble: review+
Details | Formatted Diff | Diff
Patch for landing. (2.71 KB, patch)
2016-12-09 12:12 PST, Jeremy Jones
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Jones 2016-12-09 11:16:34 PST
WebView doesn't become first responder in element fullscreen.
Comment 1 Jeremy Jones 2016-12-09 11:19:04 PST
Created attachment 296663 [details]
Patch
Comment 2 Jeremy Jones 2016-12-09 11:19:48 PST
rdar://problem/28927252
Comment 3 Tim Horton 2016-12-09 11:33:52 PST
Comment on attachment 296663 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=296663&action=review

> Source/WebKit2/ChangeLog:12
> +        This change wait until after the contentView is visible to make the web view the first responder.

"This change wait until"

> Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:619
> +    [window makeFirstResponder:_webView];

Does makeResponderFirstResponderIfDescendantOfView do something important? Should you still use that? It seems like it had to be there for a reason.
Comment 4 Jeremy Jones 2016-12-09 11:48:58 PST
(In reply to comment #3)
> Comment on attachment 296663 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=296663&action=review
> 
> > Source/WebKit2/ChangeLog:12
> > +        This change wait until after the contentView is visible to make the web view the first responder.
> 
> "This change wait until"

"waits"

Done.

> 
> > Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:619
> > +    [window makeFirstResponder:_webView];
> 
> Does makeResponderFirstResponderIfDescendantOfView do something important?
> Should you still use that? It seems like it had to be there for a reason.

It only makes the webView the first responder if if was already first responder while inline. However, it doesn't make sense to prevent web view from becoming first responder just because some search field in the app was first responder when entering fullscreen.
Comment 5 Jeremy Jones 2016-12-09 11:53:44 PST
(In reply to comment #4)
> (In reply to comment #3)
> > Comment on attachment 296663 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=296663&action=review
> > 
> > > Source/WebKit2/ChangeLog:12
> > > +        This change wait until after the contentView is visible to make the web view the first responder.
> > 
> > "This change wait until"
> 
> "waits"
> 
> Done.
> 
> > 
> > > Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:619
> > > +    [window makeFirstResponder:_webView];
> > 
> > Does makeResponderFirstResponderIfDescendantOfView do something important?
> > Should you still use that? It seems like it had to be there for a reason.
> 
> It only makes the webView the first responder if if was already first
> responder while inline. However, it doesn't make sense to prevent web view
> from becoming first responder just because some search field in the app was
> first responder when entering fullscreen.

It is useful when exiting fullscreen to prevent the web view from stealing first responder from the app when exiting fullscreen.
Comment 6 Tim Horton 2016-12-09 11:57:53 PST
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > Comment on attachment 296663 [details]
> > > Patch
> > > 
> > > View in context:
> > > https://bugs.webkit.org/attachment.cgi?id=296663&action=review
> > > 
> > > > Source/WebKit2/ChangeLog:12
> > > > +        This change wait until after the contentView is visible to make the web view the first responder.
> > > 
> > > "This change wait until"
> > 
> > "waits"
> > 
> > Done.
> > 
> > > 
> > > > Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:619
> > > > +    [window makeFirstResponder:_webView];
> > > 
> > > Does makeResponderFirstResponderIfDescendantOfView do something important?
> > > Should you still use that? It seems like it had to be there for a reason.
> > 
> > It only makes the webView the first responder if if was already first
> > responder while inline. However, it doesn't make sense to prevent web view
> > from becoming first responder just because some search field in the app was
> > first responder when entering fullscreen.
> 
> It is useful when exiting fullscreen to prevent the web view from stealing
> first responder from the app when exiting fullscreen.

Ah, makes sense. WK2r=me
Comment 7 Jeremy Jones 2016-12-09 12:12:11 PST
Created attachment 296670 [details]
Patch for landing.
Comment 8 WebKit Commit Bot 2016-12-09 12:54:46 PST
Comment on attachment 296670 [details]
Patch for landing.

Clearing flags on attachment: 296670

Committed r209624: <http://trac.webkit.org/changeset/209624>