New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 594339 link

Starred by 9 users

Issue metadata

Status: Fixed
Owner:
Last visit 29 days ago
Closed: Apr 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Console doesn't scroll to bottom

Reported by fabian.z...@gmail.com, Mar 12 2016

Issue description

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

Steps to reproduce the problem:
1. Debug an JS-App with the console open
2. 
3. 

What is the expected behavior?
Console scrolls down to bottom when new messages arrive

What went wrong?
My console stops scrolling after some messages…

Did this work before? N/A 

Chrome version: 49.0.2623.87  Channel: stable
OS Version: OS X 10.11.3
Flash Version: Shockwave Flash 21.0 r0
 
Screen Shot 2016-03-12 at 13.27.00 .png
145 KB View Download
Labels: -OS-Mac OS-All
Owner: lushnikov@chromium.org
Status: Assigned (was: Unconfirmed)
Looks like this is the intended behavior from fixing  issue 580381 .

Assigning to lushnikov to confirm.
So there's no autoscroll-to-bottom anymore?
Yea, auto-scroll is gone.

However, I noticed in testing some stuff the other day that the console jitters as if it doesn't want to go to the end in some cases. Trying to get a reproduction case going for it...

Comment 5 by cadebw...@gmail.com, Mar 14 2016

I think the sticking issue comes from logs that wrap. 

Steps to repro:

1. Shrink your dev console so the following string wraps, and run in your dev console:

for (var i = 0; i < 1000; ++i) console.log(i + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nunc lacus, tincidunt ac ullamcorper sed, sagittis eget lectus. Nam vel tempor lacus. Quisque sit amet sodales turpis, eget sagittis dui. Cras accumsan massa sed risus sodales fermentum. Praesent non vestibulum mauris, nec lobortis.');

2. Observe the console follows for the first few logs, then loses the bottom and stops following

On the other hand, running `for (var i = 0; i < 1000; ++i) console.log(i);` does work

#3, #4: There is autoscroll-to-bottom. It should work.

#5: correct, the issue comes from the wrapped console messages. Thank you!
Is there any estimate on when a fix will be available?
This is really annoying for developers!

Comment 8 by j...@woodwing.com, Apr 6 2016

Also happens when outputting HTML elements: https://output.jsbin.com/naquxaqoca
Status: Started (was: Assigned)
Project Member

Comment 10 by bugdroid1@chromium.org, Apr 7 2016

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

commit 1d413c3ebced31d7182b31ff6efb458c5a12216e
Author: lushnikov <lushnikov@chromium.org>
Date: Thu Apr 07 21:28:44 2016

DevTools: [Console] fix console stick-to-bottom behavior in case of multiline messages

The patch fixes the stick-to-bottom behavior of console in case of multiline
messages.

The patch does two things:
1. ViewportControl starts to cache provider's itemCount in invalidate call.
   This ensures that the regular scrolling of viewport is not affected
   by provider's item changes unless an invalidate method was called.

2. Stick to bottom only in case of non-user-generated gestures. This is
   done via transitioning to the event.isTrusted flag.

BUG= 594339 
R=dgozman, pfeldman

Review URL: https://codereview.chromium.org/1863313002

Cr-Commit-Position: refs/heads/master@{#385872}

[modify] https://crrev.com/1d413c3ebced31d7182b31ff6efb458c5a12216e/third_party/WebKit/LayoutTests/inspector/console/console-viewport-selection.html
[modify] https://crrev.com/1d413c3ebced31d7182b31ff6efb458c5a12216e/third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom-expected.txt
[modify] https://crrev.com/1d413c3ebced31d7182b31ff6efb458c5a12216e/third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html
[modify] https://crrev.com/1d413c3ebced31d7182b31ff6efb458c5a12216e/third_party/WebKit/Source/devtools/front_end/ui/ViewportControl.js

Labels: Merge-Request-50
It would be nice to have this in M50.

Comment 12 by tin...@google.com, Apr 8 2016

Has this been baked in canary and verified?

Comment 13 by tin...@google.com, Apr 8 2016

Labels: -Merge-Request-50 Merge-Review-50 Hotlist-Merge-Review
[Automated comment] Less than 2 weeks to go before stable on M50, manual review required.
Verified working on Mac chrome canary

Comment 15 by tin...@google.com, Apr 8 2016

Labels: -Merge-Review-50 Merge-Approved-50
Merge approved for M50 (branch 2661). Pls go ahead merge.
Project Member

Comment 16 by bugdroid1@chromium.org, Apr 9 2016

Labels: -merge-approved-50 merge-merged-2661
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7c8faba3e1586366ae97bba310f0aa6df9b14281

commit 7c8faba3e1586366ae97bba310f0aa6df9b14281
Author: Andrey Lushnikov <lushnikov@chromium.org>
Date: Sat Apr 09 00:09:12 2016

DevTools: [Console] fix console stick-to-bottom behavior in case of multiline messages

The patch fixes the stick-to-bottom behavior of console in case of multiline
messages.

The patch does two things:
1. ViewportControl starts to cache provider's itemCount in invalidate call.
   This ensures that the regular scrolling of viewport is not affected
   by provider's item changes unless an invalidate method was called.

2. Stick to bottom only in case of non-user-generated gestures. This is
   done via transitioning to the event.isTrusted flag.

BUG= 594339 
R=dgozman, pfeldman

Review URL: https://codereview.chromium.org/1863313002

Cr-Commit-Position: refs/heads/master@{#385872}
(cherry picked from commit 1d413c3ebced31d7182b31ff6efb458c5a12216e)

Review URL: https://codereview.chromium.org/1875853002 .

Cr-Commit-Position: refs/branch-heads/2661@{#538}
Cr-Branched-From: ef6f6ae5e4c96622286b563658d5cd62a6cf1197-refs/heads/master@{#378081}

[modify] https://crrev.com/7c8faba3e1586366ae97bba310f0aa6df9b14281/third_party/WebKit/LayoutTests/inspector/console/console-viewport-selection.html
[modify] https://crrev.com/7c8faba3e1586366ae97bba310f0aa6df9b14281/third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom-expected.txt
[modify] https://crrev.com/7c8faba3e1586366ae97bba310f0aa6df9b14281/third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html
[modify] https://crrev.com/7c8faba3e1586366ae97bba310f0aa6df9b14281/third_party/WebKit/Source/devtools/front_end/ui/ViewportControl.js

Status: Fixed (was: Started)
Labels: TE-Verified-50.0.2661.75 TE-Verified-M50
Tested the issue on Windows 7, Mac 10.10.5, Ubuntu 14.04 using 50.0.2661.75.Observed that console scrolls down to bottom when new messages arrive.
Please find attached screencast.

Marking it as TE-Verified.
594399.mp4
1.2 MB Download

Comment 19 by j...@woodwing.com, Apr 13 2016

Tested with Version 52.0.2707.0 canary (64-bit) on Mac OS X 10.10.5.
Doesn't fix scroll issue as can be observed in https://output.jsbin.com/qefeso
@jhu: it is fixed for long wrapping messages; embedded nodes contribute to a different scenario, which is not currently supported.

I've filed a separate issue for that:  https://crbug.com/603294 

Sign in to add a comment