New issue
Advanced search Search tips

Issue 808130 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

DevTools: pressing up in console should not go to last command

Project Member Reported by l...@chromium.org, Feb 1 2018

Issue description

What steps will reproduce the problem?
(1) Enter a long expression in console prompt that wraps, when cursor is on the second 'visible' line (due to word wrapping)
(2) Press up

What is the expected result?
Should not load the last message

What happens instead?
Loads the previous message and interrupts user workflow!
 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8bb1cb186012b6a8e690419b3d18b1eb7ebc76b3

commit 8bb1cb186012b6a8e690419b3d18b1eb7ebc76b3
Author: Erik Luo <luoe@chromium.org>
Date: Thu Mar 08 03:40:05 2018

DevTools: make console prompt aware of linewrap in handling arrow keys

The console prompt currently listens for ArrowUp/ArrowDown and loads
the next/previous command from history, if the cursor is on the
first/last line.

Since a logical CodeMirror line may wrap onto multiple visual rows,
this may unintentionally load the next command. This CL adds a check
whether the cursor is truly on the first/last visual row.

Problem gif: https://imgur.com/a/s7gPL

Bug:  808130 
Change-Id: I04363e25206cece28b32b80dfc548340413112cf
Reviewed-on: https://chromium-review.googlesource.com/927690
Commit-Queue: Erik Luo <luoe@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541714}
[modify] https://crrev.com/8bb1cb186012b6a8e690419b3d18b1eb7ebc76b3/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-prompt-keyboard-expected.txt
[modify] https://crrev.com/8bb1cb186012b6a8e690419b3d18b1eb7ebc76b3/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-prompt-keyboard.js
[modify] https://crrev.com/8bb1cb186012b6a8e690419b3d18b1eb7ebc76b3/third_party/WebKit/Source/devtools/front_end/console/ConsolePrompt.js
[modify] https://crrev.com/8bb1cb186012b6a8e690419b3d18b1eb7ebc76b3/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
[modify] https://crrev.com/8bb1cb186012b6a8e690419b3d18b1eb7ebc76b3/third_party/WebKit/Source/devtools/front_end/ui/TextEditor.js

Comment 2 by l...@chromium.org, Mar 8 2018

Status: Fixed (was: Assigned)

Sign in to add a comment