New issue
Advanced search Search tips

Issue 667072 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Console no longer scrolls when navigating up through history in input textbox

Project Member Reported by michae...@chromium.org, Nov 19 2016

Issue description

Version: 55.0.2883.52, 57.0.2925.0, ...
OS: Windows

1. Open the DevTools console (Ctrl+Shift+J)
2. Generate some history, enough to make the window scrollable:
   for (var i = 0; i < 200; i++) console.log('hello ' + i);
3. Write a multi-line statement, e.g.
   function foo() {
     return 42;
   }
4. Press the Up arrow key to populate the textbox with the same input from #3

Expected: The window scrolls to the bottom so the entire input text is visible.
Actual: The window doesn't automatically scroll.

Even if the cursor is on the top line, I thought it used to scroll so the whole content was visible.

The scrolling still happens when navigating forward after navigating back, e.g.:
  5. Press the Up arrow key again to go back to the for loop
  6. Press the Down arrow key to go forward to the multi-line statement
puts the cursor on the last line of the statement which forces the expected scroll.
 
Summary: Console no longer scrolls when navigating up through history in input textbox (was: Console no longer scrolls when navigating through history in input textbox)
Labels: -Type-Bug Type-Bug-Regression
Maybe this is just a manifestation of  issue 646056 ?

Comment 3 by l...@chromium.org, Nov 21 2016

Cc: -l...@chromium.org -skobes@chromium.org
Owner: l...@chromium.org
Status: Assigned (was: Untriaged)
Thank you for the report, I've had this happen to me a few times as well.  Removing skobes@ because this isn't caused by scroll anchoring.

We're using a mutation observer to track when messages change and then call stickToBottom.  The prompt itself is not part of the ViewportControl that manages the observer, so isn't listening to its changes.

With 646056, on keyup events, we just need to check that the cursor is not visible before jumping to the bottom.
Labels: M-57
Project Member

Comment 5 by bugdroid1@chromium.org, Dec 15 2016

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

commit 0342d5e0c9cec8cc41db3c5b6fa50467ba978cfe
Author: pfeldman <pfeldman@chromium.org>
Date: Thu Dec 15 20:15:17 2016

DevTools: keep the stick to bottom behavior and update scroll bar position while iterating console history.

BUG= 667072 

Review-Url: https://codereview.chromium.org/2576243002
Cr-Commit-Position: refs/heads/master@{#438907}

[modify] https://crrev.com/0342d5e0c9cec8cc41db3c5b6fa50467ba978cfe/third_party/WebKit/Source/devtools/front_end/console/ConsolePrompt.js

Comment 6 by l...@chromium.org, Feb 23 2017

Status: Fixed (was: Assigned)
This looks fixed by pfeldman@'s change

Sign in to add a comment