Bug 203743

Summary: Web Inspector: default to focusing the console prompt if no other content is focused after opening Web Inspector
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, commit-queue, eric.carlson, hi, inspector-bugzilla-changes, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 203744, 203932, 203939    
Attachments:
Description Flags
Patch
eric.carlson: review+
Patch
hi: commit-queue+
Archive of layout-test-results from webkit-cq-01 for mac-highsierra
none
Patch none

Description Devin Rousso 2019-11-01 09:54:39 PDT
If the user is looking at the Canvas Tab, for example, there is no preserved selection/focused state between Web Inspector sessions, so if the user opens Web Inspector to the Canvas Tab, there will be no initial focus.
Comment 1 Devin Rousso 2019-11-01 10:01:52 PDT
Created attachment 382590 [details]
Patch
Comment 2 Eric Carlson 2019-11-01 11:46:19 PDT
Comment on attachment 382590 [details]
Patch

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

Thank you!

> Source/WebInspectorUI/UserInterface/Base/Main.js:925
> +    return !WI._defaultFocusedQuickConcolePrompt && WI.quickConsole.prompt.focused;

Nit: s/_defaultFocusedQuickConcolePrompt/_defaultFocusedQuickConsolePrompt/

> Source/WebInspectorUI/UserInterface/Base/Main.js:1364
> +    WI._defaultFocusedQuickConcolePrompt = false;

Ditto.

> Source/WebInspectorUI/UserInterface/Base/Main.js:1546
> +        WI._defaultFocusedQuickConcolePrompt = true;

Ditto
Comment 3 BJ Burg 2019-11-01 11:48:11 PDT
Comment on attachment 382590 [details]
Patch

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

r=me

> Source/WebInspectorUI/UserInterface/Base/Main.js:925
> +    return !WI._defaultFocusedQuickConcolePrompt && WI.quickConsole.prompt.focused;

Typo: console

A better name could be: WI._didAutofocusConsolePrompt
Comment 4 Devin Rousso 2019-11-01 13:50:12 PDT
Created attachment 382619 [details]
Patch
Comment 5 WebKit Commit Bot 2019-11-01 15:05:39 PDT Comment hidden (obsolete)
Comment 6 WebKit Commit Bot 2019-11-01 15:05:45 PDT Comment hidden (obsolete)
Comment 7 WebKit Commit Bot 2019-11-01 15:21:44 PDT Comment hidden (obsolete)
Comment 8 WebKit Commit Bot 2019-11-01 15:21:46 PDT Comment hidden (obsolete)
Comment 9 Devin Rousso 2019-11-01 16:20:08 PDT
Created attachment 382648 [details]
Patch
Comment 10 WebKit Commit Bot 2019-11-01 17:19:21 PDT
Comment on attachment 382648 [details]
Patch

Clearing flags on attachment: 382648

Committed r251958: <https://trac.webkit.org/changeset/251958>
Comment 11 WebKit Commit Bot 2019-11-01 17:19:22 PDT
All reviewed patches have been landed.  Closing bug.
Comment 12 Radar WebKit Bug Importer 2019-11-01 17:20:22 PDT
<rdar://problem/56833461>