Bug 203743 - Web Inspector: default to focusing the console prompt if no other content is focused after opening Web Inspector
Summary: Web Inspector: default to focusing the console prompt if no other content is ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks: 203744 203932 203939
  Show dependency treegraph
 
Reported: 2019-11-01 09:54 PDT by Devin Rousso
Modified: 2019-11-06 19:17 PST (History)
6 users (show)

See Also:


Attachments
Patch (2.34 KB, patch)
2019-11-01 10:01 PDT, Devin Rousso
eric.carlson: review+
Details | Formatted Diff | Diff
Patch (2.34 KB, patch)
2019-11-01 13:50 PDT, Devin Rousso
hi: commit-queue+
Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-cq-01 for mac-highsierra (3.70 MB, application/zip)
2019-11-01 15:21 PDT, WebKit Commit Bot
no flags Details
Patch (2.34 KB, patch)
2019-11-01 16:20 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>