Bug 148165

Summary: REGRESSION (r188581): Web Inspector: Option-Enter no longer inserts a new line in the console
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 Local Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Description Nikita Vasilyev 2015-08-18 22:22:53 PDT
Regression from: Web Inspector: Option-Enter should commit console command without erasing the prompt https://bugs.webkit.org/show_bug.cgi?id=148123
Comment 1 Radar WebKit Bug Importer 2015-08-18 22:23:02 PDT
<rdar://problem/22338630>
Comment 2 Nikita Vasilyev 2015-08-18 22:37:28 PDT
Shift-Enter and Control-Enter insert a line break.
Option-Enter used to insert a line break, but since r188581 it evaluates a command and keeps it in the prompt.
Command-Enter forces execution, e.g. "1+" would show an error.

Here is what I think we should do:

— Shift-Enter, Control-Enter, and Option-Enter should all insert a line break, as it was before r188581.
— Command-Enter should force execution AND keep the command in the prompt

If somebody uses force execution, sees a syntax error, it's very likely they would press Up and edit the previous command. We may as well save that Up keypress and not erase the prompt.

In fact, this is exactly how it works in Firebug multiline console — Command-Enter forces execution and keeps the command in the prompt.
Comment 3 Nikita Vasilyev 2015-08-18 22:48:43 PDT
Created attachment 259359 [details]
Patch
Comment 4 WebKit Commit Bot 2015-08-19 00:11:45 PDT
Comment on attachment 259359 [details]
Patch

Clearing flags on attachment: 259359

Committed r188635: <http://trac.webkit.org/changeset/188635>
Comment 5 WebKit Commit Bot 2015-08-19 00:11:51 PDT
All reviewed patches have been landed.  Closing bug.