New issue
Advanced search Search tips

Issue 863664 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 7
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Console not autoscrolling to bottom

Reported by manuelch...@gmail.com, Jul 14

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

Steps to reproduce the problem:
1. Open dev tools
2. Type something that yields a result
3. It doesn't scroll to the bottom on new result

What is the expected behavior?
Like it was before, it will always autoscroll to the bottom on new commands if already at the bottom.

What went wrong?
It doesn't scroll/stick to the bottom. In the image you can see how it looks after I pressed Enter on that command.

Did this work before? N/A 

Chrome version: 67.0.3396.99  Channel: stable
OS Version: 10.0
Flash Version:
 
PVrI1vh.jpg
76.3 KB View Download
Can't reproduce in Chrome 67.
Able to reproduce in Chrome 69.

Bisected to r563360 = b13cc46147324f9520672b44f6a2c41c5764ee43 = https://crrev.com/c/1080372 by luoe@chromium.org
"DevTools: enable Eager Evaluation by default"
Landed in 69.0.3447.0

Repro:
1. open devtools on any page
2. dock devtools to bottom (Ctrl-Shift-D)
3. type 1, press Enter, type 2, press Enter, and so on for 3 4 5 6 7 - until you fill the entire console
4. make sure the input prompt line is at the very bottom of devtools (see screenshot)
5. type 123, press Enter

Expected: 123 is shown two times (one for your input and second for the result)
Observed: 123 is shown one time, the result is not visible
screenshot.png
47.3 KB View Download
On Chrome 67 it only seems to happen if you open a dev tools console that is already filled. If you start filling it yourself it won't happen. 
So comment #1 is about another bug: scrolling was broken twice.
Should it be filed in a separate issue?

==================================

Able to reproduce the original bug in #0:

1. open the attached test.html
2. open devtools console
3. type 123 and press Enter

Expected: 123 is shown two times
Observed: 123 is shown one time (the second 123 is scrolled out of view)

Bisected to r535579 = 60c81ca7fbd73c42c303d4ce65730f802575636c = https://crrev.com/c/830617 by luoe@chromium.org
"DevTools: do not scroll console to bottom when prompt cursor is visible"
Landed in 66.0.3344.0

It seems the change was intended yet there *has* to be a better way to have both use cases fixed.
Without seeing the statistics I'd suppose one-liners constitute 99.999% of devtools input.
Attachment for comment#3.
test.html
77 bytes View Download
Labels: Needs-Triage-M67
Owner: l...@chromium.org
Status: Assigned (was: Unconfirmed)
This is still a problem in Chrome 70 :/
Sorry for the delays, I still plan to fix both cases.  Keeping 2 cases under 1 crbug is fine for me, since their root cause / solutions might be very related.

Just to recap the cases:
- Opening Console on a page that already overflows with logs (e.g. c#4's attachment), type, press Enter
- Opening a non-filled Console, manually add overflow of logs, scroll up via wheel / scrollbar to a point where the prompt is still partially visible, type, press Enter

I can repro both.
Project Member

Comment 9 by bugdroid1@chromium.org, Nov 7

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

commit 60802eced856d89133f211ef29df6124f29401bd
Author: Erik Luo <luoe@chromium.org>
Date: Wed Nov 07 02:43:25 2018

DevTools: fix Console stick-to-bottom on load, enter

Fixes 2 stick to bottom cases
- Prompt has text, but is scrolled out of view. User presses 'Enter'.
  Browsers usually scroll an field into view on input events, but
  Console preventsDefault to avoid adding a newline. Now, we will
  emulate the scroll.
- Page logs a ton of messages, Console opened for the first time.
  CodeMirror asynchronously resized prompt height on load, which
  broke stick to bottom. This CL changes layout so that prompt
  height does not grow on editor load.

Bug:  863664 
Change-Id: Ia25a71100d9a895d4c8c710b36ba1d8b76d76990
Reviewed-on: https://chromium-review.googlesource.com/c/1321575
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605936}
[modify] https://crrev.com/60802eced856d89133f211ef29df6124f29401bd/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-viewport-stick-to-bottom-expected.txt
[add] https://crrev.com/60802eced856d89133f211ef29df6124f29401bd/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-viewport-stick-to-bottom-onload-expected.txt
[add] https://crrev.com/60802eced856d89133f211ef29df6124f29401bd/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-viewport-stick-to-bottom-onload.js
[modify] https://crrev.com/60802eced856d89133f211ef29df6124f29401bd/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-viewport-stick-to-bottom.js
[modify] https://crrev.com/60802eced856d89133f211ef29df6124f29401bd/third_party/blink/renderer/devtools/front_end/console/ConsolePrompt.js
[modify] https://crrev.com/60802eced856d89133f211ef29df6124f29401bd/third_party/blink/renderer/devtools/front_end/console/consoleView.css

Status: Fixed (was: Assigned)

Sign in to add a comment