Bug 143030

Summary: REGRESSION: Inspector doesn't get focused when opened in dock mode
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: Web InspectorAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, graouts, joepeck, jonowells, mattbaker, nvasilyev, sam, thorton, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 126800    
Attachments:
Description Flags
Patch none

Description Ryosuke Niwa 2015-03-24 17:24:50 PDT
When Web Inspector is opened in the docked mode, it doesn't become the first responder
even through the caret rendered by CodeMirror starts blinking.
Comment 1 Radar WebKit Bug Importer 2015-03-24 17:25:22 PDT
<rdar://problem/20285019>
Comment 2 Ryosuke Niwa 2015-03-24 17:40:23 PDT
Created attachment 249369 [details]
Patch
Comment 3 Joseph Pecoraro 2015-03-24 18:05:14 PDT
Comment on attachment 249369 [details]
Patch

Looks good to me! Needs a WK2 Owner's approval
Comment 4 Timothy Hatcher 2015-03-24 18:09:31 PDT
Comment on attachment 249369 [details]
Patch

Should we fix WKWebView to "forward" first responder status when it gets becomeFirstResponder? That way no one else runs into this issue.
Comment 5 Ryosuke Niwa 2015-03-24 18:12:25 PDT
(In reply to comment #4)
> Comment on attachment 249369 [details]
> Patch
> 
> Should we fix WKWebView to "forward" first responder status when it gets
> becomeFirstResponder? That way no one else runs into this issue.

I don't think so at least not according to Andres. He suggested making WKWebView return NO in acceptsFirstResponder but I'd prefer landing it as a separate patch.
Comment 6 Timothy Hatcher 2015-03-24 18:19:32 PDT
If you were a third party developer, how would you get the WKView to make it the first responder. You couldn't.

Please fix this properly.
Comment 7 Ryosuke Niwa 2015-03-24 19:35:37 PDT
(In reply to comment #6)
> If you were a third party developer, how would you get the WKView to make it
> the first responder. You couldn't.

You'd create your own WKView via: [WKView initWithFrame]

> Please fix this properly.

If you think this API design is wrong, please file a separate bug. That's a much broader scope than fixing this regression. Quite frankly, I don't even want to work on this bug if it wasn't blocking the bug 126800.
Comment 8 Tim Horton 2015-03-24 19:37:22 PDT
(In reply to comment #7)
> (In reply to comment #6)
> > If you were a third party developer, how would you get the WKView to make it
> > the first responder. You couldn't.
> 
> You'd create your own WKView via: [WKView initWithFrame]

WKView is not API.
Comment 9 Ryosuke Niwa 2015-03-24 19:37:39 PDT
Comment on attachment 249369 [details]
Patch

Clearing flags on attachment: 249369

Committed r181927: <http://trac.webkit.org/changeset/181927>
Comment 10 Ryosuke Niwa 2015-03-24 19:37:44 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Ryosuke Niwa 2015-03-24 19:43:22 PDT
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #6)
> > > If you were a third party developer, how would you get the WKView to make it
> > > the first responder. You couldn't.
> > 
> > You'd create your own WKView via: [WKView initWithFrame]
> 
> WKView is not API.

Huh, I guess it's SPI but not API?  Anyway, we should move that discussion into another bug.