Bug 148121

Summary: Web Inspector: Allow typing command when a console message is selected
Product: WebKit Reporter: Nikita Vasilyev <nvasilyev>
Component: Web InspectorAssignee: Nikita Vasilyev <nvasilyev>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, commit-queue, graouts, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
[Animated GIF] With the patch applied
none
Patch none

Description Nikita Vasilyev 2015-08-17 22:21:28 PDT
Created attachment 259247 [details]
[Animated GIF] With the patch applied

I've noticed a several people clicking in the middle of the console and starting typing commands. In Chrome DevTools, Firefox DevTools, and Firebug if you click once anywhere in the console, it focuses on the console prompt. In Web Inspector, if you click on a console message it selects that message. Typing commands doesn't do anything at this point.

In Terminal.app and iTerm, even if you have text selected, you can still type commands.
Comment 1 Radar WebKit Bug Importer 2015-08-17 22:21:48 PDT
<rdar://problem/22320449>
Comment 2 Nikita Vasilyev 2015-08-17 22:28:27 PDT
Created attachment 259248 [details]
Patch

I've run this patch for the past two days and now it's hard for me to go back. I think it's a big improvement.
Comment 3 Timothy Hatcher 2015-08-17 22:36:38 PDT
Comment on attachment 259248 [details]
Patch

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

I agree. I did this in Colloquy too.

> Source/WebInspectorUI/UserInterface/Views/LogContentView.js:734
> +        const isCommandC = event.metaKey && event.keyCode === 99;

keyIdentifier === "C"?
Comment 4 Nikita Vasilyev 2015-08-17 22:42:21 PDT
(In reply to comment #3)
> Comment on attachment 259248 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=259248&action=review
> 
> I agree. I did this in Colloquy too.
> 
> > Source/WebInspectorUI/UserInterface/Views/LogContentView.js:734
> > +        const isCommandC = event.metaKey && event.keyCode === 99;
> 
> keyIdentifier === "C"?

It's an empty string for Command-C.
Comment 5 WebKit Commit Bot 2015-08-17 23:28:18 PDT
Comment on attachment 259248 [details]
Patch

Clearing flags on attachment: 259248

Committed r188578: <http://trac.webkit.org/changeset/188578>
Comment 6 WebKit Commit Bot 2015-08-17 23:28:22 PDT
All reviewed patches have been landed.  Closing bug.