New issue
Advanced search Search tips

Issue 825386 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

DevTools: suggestbox is narrow after entering long command with spaces/newlines

Project Member Reported by l...@chromium.org, Mar 23 2018

Issue description

What steps will reproduce the problem?
(1) Evaluate in DevTools console a command that is very long in length, but contains mostly spaces/newlines
(2) Type the first letter of the command to open suggestbox w/ autocomplete

What is the expected result?
SuggestBox width should not be super narrow

What happens instead?
It's super narrow

Screenshot: https://imgur.com/a/LcQEQ
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 31 2018

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

commit b43ea0045676c99221996b441a0bfcce9741fb47
Author: Erik Luo <luoe@chromium.org>
Date: Thu May 31 02:36:56 2018

DevTools: fix suggestbox preferred width measurement

SuggestBox determines its preferred width by taking the character
length of the longest item, which includes whitespace. However,
whitespace is not preserved without 'white-space: pre', so
measurements are incorrect.

Screenshot: https://imgur.com/a/LcQEQ

Furthermore, preferred width measurements do not factor in the
scrollbar width.

Screenshot: https://imgur.com/a/x8MEF

Bug:  825386 
Change-Id: I785dfca5d6a75832c62f41fa8140fb5f8c0dd3f1
Reviewed-on: https://chromium-review.googlesource.com/978937
Commit-Queue: Erik Luo <luoe@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563129}
[modify] https://crrev.com/b43ea0045676c99221996b441a0bfcce9741fb47/third_party/blink/renderer/devtools/front_end/ui/SuggestBox.js
[modify] https://crrev.com/b43ea0045676c99221996b441a0bfcce9741fb47/third_party/blink/renderer/devtools/front_end/ui/suggestBox.css

Comment 2 by l...@chromium.org, May 31 2018

Status: Fixed (was: Assigned)

Sign in to add a comment