New issue
Advanced search Search tips

Issue 623653 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

DevTools: [Console] readline destroys work when arrowing past the top or bottom of the written code.

Reported by trusktr@gmail.com, Jun 27 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36

Steps to reproduce the problem:
Accidentally pressing up or down arrow keys destroys the code that the command-line user wrote.

What is the expected behavior?
It should always be saved at the bottom of the stack (by bottom I mean the result closest to the empty command line when pressing down arrow).

What went wrong?
The written code gets destroyed, which makes editing in the console less productive than it could be, and can lead to frustrating experiences of lost work (no one likes losing work they've put into writing something).

Did this work before? N/A 

Chrome version: 51.0.2704.103  Channel: n/a
OS Version: OS X 10.10.2
Flash Version: Shockwave Flash 22.0 r0

I end up having to open an external editor to prevent from messing up, and to save my temporary code. It's too easy to accidentally erase your work in Chrome's command line by accidentally moving up or down with the (supposedly natural) arrow keys, and makes the command line less appealing as a tool.
 
Owner: l...@chromium.org
Status: Assigned (was: Unconfirmed)
I like the idea of retaining any unevaluated work. I've been caught out by this a few times myself.  

On the other hand we're interested in just adding a multi-line console, which would be slightly better. What do you think?
Components: Platform>DevTools>JavaScript
Summary: DevTools: [Console] readline destroys work when arrowing past the top or bottom of the written code. (was: Command line destroys work when arrowing past the top or bottom of the written code.)

Comment 3 by l...@chromium.org, Jul 1 2016

Thank you for the report trusktr@.

With a multi-line console, I imagine there could still be a way to switch back to single-line mode where this might be useful.

Comment 4 by trusktr@gmail.com, Jul 2 2016

> multi-line console

Do you mean like a text editor with syntax highlighting? That might be nice. I thought the current console was already multi-line (pressing shift+enter for new lines)?

> a way to switch back to single-line mode

That sounds good, perhaps with a toggle button, checkbox, or similar.
Owner: einbinder@chromium.org
Status: Fixed (was: Assigned)

Sign in to add a comment