Bug 148165 - REGRESSION (r188581): Web Inspector: Option-Enter no longer inserts a new line in the console
Summary: REGRESSION (r188581): Web Inspector: Option-Enter no longer inserts a new lin...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Nikita Vasilyev
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-08-18 22:22 PDT by Nikita Vasilyev
Modified: 2015-08-19 00:11 PDT (History)
8 users (show)

See Also:


Attachments
Patch (2.27 KB, patch)
2015-08-18 22:48 PDT, Nikita Vasilyev
no flags Details | Formatted Diff | Diff

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