New issue
Advanced search Search tips

Issue 698428 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

DevTools: stick to bottom fails after loading text from history in console prompt

Project Member Reported by l...@chromium.org, Mar 3 2017

Issue description

Repro:
Log a bunch of messages to generate a scrollbar
scroll up
add message (up to load command from history, then enter)
toggle settings gear icon
scroll by dragging bar

Symptom explanation
In this case, we jump close/exactly to the bottom without setting stick to bottom = true.  The viewport thinks it’s not at the bottom when it really is.

Root cause
Codemirror uses setText which uses setValue which doesn’t trigger an “input” event so our promptInput doesn’t fire so we don’t immediately go to bottom, we sometimes go to 2 pixels above bottom.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 5 2017

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

commit c1faecf64579d2d1a8525e775913fa7b6df43de6
Author: luoe <luoe@chromium.org>
Date: Wed Apr 05 00:50:43 2017

DevTools: update console viewport scroll when prompt is resized

Console's viewport used to jump to bottom when prompt input happens. This misses
cases when prompt text changes after the 'input' event or the 'input' event
does not fire:
- Press 'Up' when not scrolled to bottom to load multiline text
- Start typing a multiline command from history and use autocomplete

Now, it will listen to a more accurate event from the text editor.

BUG= 674374 ,  698428 

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

[modify] https://crrev.com/c1faecf64579d2d1a8525e775913fa7b6df43de6/third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom-expected.txt
[modify] https://crrev.com/c1faecf64579d2d1a8525e775913fa7b6df43de6/third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html
[modify] https://crrev.com/c1faecf64579d2d1a8525e775913fa7b6df43de6/third_party/WebKit/Source/devtools/front_end/console/ConsolePrompt.js
[modify] https://crrev.com/c1faecf64579d2d1a8525e775913fa7b6df43de6/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
[modify] https://crrev.com/c1faecf64579d2d1a8525e775913fa7b6df43de6/third_party/WebKit/Source/devtools/front_end/source_frame/SourceFrame.js
[modify] https://crrev.com/c1faecf64579d2d1a8525e775913fa7b6df43de6/third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js
[modify] https://crrev.com/c1faecf64579d2d1a8525e775913fa7b6df43de6/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
[modify] https://crrev.com/c1faecf64579d2d1a8525e775913fa7b6df43de6/third_party/WebKit/Source/devtools/front_end/ui/TextEditor.js

Comment 2 by l...@chromium.org, Apr 5 2017

Status: Fixed (was: Assigned)

Sign in to add a comment