WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
147927
Web Inspector: Control-backtick should focus on the console prompt
https://bugs.webkit.org/show_bug.cgi?id=147927
Summary
Web Inspector: Control-backtick should focus on the console prompt
Nikita Vasilyev
Reported
2015-08-12 00:00:56 PDT
This is a feedback from
https://twitter.com/glenmaddern
. Esc key focuses on the console prompt line, unless: — the text cursor is in a text field (e.g. the global search field at the top right corner, filter fields, etc.) — the text cursor is in the styles sidebar — the text cursor is inside of any CodeMirror view — DOM node content/attribute is being edited in Elements — there is a text selection — <select> menu is opened — autocomplete suggestion is opened — a message in the Console tab is already selected (needs two Esc presses to focus on the prompt, not one) The list goes on and on. We need a keyboard shortcut that would just focus on the console prompt so one could press it with their eyes closed and start typing console commands, no matter which more they're in.
Attachments
Patch
(2.23 KB, patch)
2015-08-17 11:24 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Patch
(2.75 KB, patch)
2015-08-18 10:32 PDT
,
Devin Rousso
bburg
: review+
Details
Formatted Diff
Diff
Patch
(2.63 KB, patch)
2015-08-18 10:54 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Timothy Hatcher
Comment 1
2015-08-12 00:05:15 PDT
Sounds good, as long as escape still works. Does Chrome have a better one? Esc still works there with similar caveats. (Actually it just opens and closes the drawer, it doesn't show the Console in the drawer. Eww.)
Nikita Vasilyev
Comment 2
2015-08-12 00:20:26 PDT
No, not really. Command-Option-J opens console and focuses on the prompt line if Chrome DevTools are closed. It closes the DevTools if it's already opened. Esc doesn't trigger autocomplete in Chrome, so the issue is less severe. It can also open the split console when HTML/CSS/JS resource is being edited, unlike in WebKit Inspector.
Nikita Vasilyev
Comment 3
2015-08-17 00:26:44 PDT
Chrome DevTools also has Control ~ (tilde), which does exactly what I have proposed. We should support it.
Radar WebKit Bug Importer
Comment 4
2015-08-17 00:26:58 PDT
<
rdar://problem/22304177
>
Devin Rousso
Comment 5
2015-08-17 11:24:02 PDT
Created
attachment 259165
[details]
Patch Just FYI, you can also press Option+Command+C to immediately switch to the console tab and focus the prompt. It isn't as subtle as toggling the split console, but it works.
Nikita Vasilyev
Comment 6
2015-08-17 23:08:43 PDT
Comment on
attachment 259165
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=259165&action=review
Option+Command+C also doesn't work when: — the text cursor is in a text field (e.g. the global search field at the top right corner, filter fields, etc.) — the text cursor is in the styles sidebar — the text cursor is inside of any CodeMirror view — <select> menu is opened
> Source/WebInspectorUI/UserInterface/Base/Main.js:248 > + this._quickConsoleKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.Control, WebInspector.KeyboardShortcut.Key.Apostrophe, this.showSplitConsole.bind(this));
This focuses on the console prompt and opens the split console. I think we should just focus on the prompt, nothing else.
Devin Rousso
Comment 7
2015-08-18 10:26:42 PDT
(In reply to
comment #6
)
> Option+Command+C also doesn't work when: > — the text cursor is in a text field (e.g. the global search field at the > top right corner, filter fields, etc.) > — the text cursor is in the styles sidebar > — the text cursor is inside of any CodeMirror view > — <select> menu is opened
I am actually seeing Option+Command+C working in all but the <select> scenario. It's bound in Main.js so it fires before everything else. For the <select>, I don't think that there is anything we can do there since that is system behavior.
Devin Rousso
Comment 8
2015-08-18 10:32:30 PDT
Created
attachment 259278
[details]
Patch
Blaze Burg
Comment 9
2015-08-18 10:41:20 PDT
Comment on
attachment 259278
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=259278&action=review
r=me
> Source/WebInspectorUI/ChangeLog:11 > + Added a keyboard shortcut to focus the console prompt.
Please say here what the new keyboard shortcut *is*.
Devin Rousso
Comment 10
2015-08-18 10:54:29 PDT
Created
attachment 259281
[details]
Patch
WebKit Commit Bot
Comment 11
2015-08-18 11:47:52 PDT
Comment on
attachment 259281
[details]
Patch Clearing flags on attachment: 259281 Committed
r188586
: <
http://trac.webkit.org/changeset/188586
>
WebKit Commit Bot
Comment 12
2015-08-18 11:47:56 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug