Bug 126800

Summary: Web Inspector: Switching tabs to window with inspector open prohibits typing into console
Product: WebKit Reporter: Jonathan Wells <jonowells>
Component: Web InspectorAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, dbates, enrica, joepeck, jonlee, rniwa, sam, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.9   
Bug Depends on: 143030    
Bug Blocks:    
Attachments:
Description Flags
Fixes the bug andersca: review+

Description Jonathan Wells 2014-01-10 17:57:11 PST
There is an issue with the text input field in the console. In many situations, switching back to a window with the console open, clicking into the console text entry field, then typing results in no text being entered. To reproduce:

1. Open Safari using the nightly build to a blank page.
2. Hit Option-Command-C to open the console
3. Enter a command to confirm the field currently works.
4. Hit Command-T to open a new tab.
5. Hit Shift-Command-[ to move back to the first tab.
6. Click inside the console entry field.
7. Type a key other than Tab or Delete. 

A key other than these will not work.
Comment 1 Radar WebKit Bug Importer 2014-01-10 17:57:29 PST
<rdar://problem/15798159>
Comment 2 Ryosuke Niwa 2015-03-25 03:35:08 PDT
Created attachment 249396 [details]
Fixes the bug
Comment 3 Anders Carlsson 2015-03-25 13:59:27 PDT
Comment on attachment 249396 [details]
Fixes the bug

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

> Source/WebKit2/UIProcess/WebPageProxy.h:396
> +    void updateFocusAppearance();

I think this should have a more descriptive name that indicates that it restores the selection.
Comment 4 Ryosuke Niwa 2015-03-25 14:14:49 PDT
(In reply to comment #3)
> Comment on attachment 249396 [details]
> Fixes the bug
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=249396&action=review
> 
> > Source/WebKit2/UIProcess/WebPageProxy.h:396
> > +    void updateFocusAppearance();
> 
> I think this should have a more descriptive name that indicates that it
> restores the selection.

Renamed to restoreSelectionInFocusedEditableElement.
Comment 5 Ryosuke Niwa 2015-03-25 14:19:46 PDT
Committed r181972: <http://trac.webkit.org/changeset/181972>