New issue
Advanced search Search tips

Issue 919997 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jan 11
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Text truncated when center/right aligned and using white-space: pre-wrap

Reported by mse...@gmail.com, Jan 8

Issue description

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

Steps to reproduce the problem:
1. View attached HTML file

What is the expected behavior?
None of the words should be truncated by ellipsis

What went wrong?
I noticed a centered label in a report that had an unexpected truncation.  There's plenty of space for this label to display its full text.

It seems that if text-align is center or right and white-space: pre-wrap is used, this odd truncation occurs.  The problem is present in Chrome and IE11 but works as expected in Firefox.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 71.0.3578.98  Channel: stable
OS Version: 10.0
Flash Version:
 
text-wrap-issue.html
656 bytes View Download
truncation.png
6.1 KB View Download
Labels: Needs-Triage-M71
Bisected to r275860 "Enable DirectWrite by default"
Landed in 37.0.2043.0

Confirmed by disabling DirectWrite and observing correct rendering.
Note, the official Chrome can't disable it anymore.
Cc: vamshi.kommuri@chromium.org scottmg@chromium.org
Labels: Target-73 Triaged-ET FoundIn-72 M-73 FoundIn-71 FoundIn-73
Status: Untriaged (was: Unconfirmed)
Thanks for filing the issue!

Able to reproduce the issue on reported chrome version 71.0.3578.98 and on the latest  canary 73.0.3664.0 using Windows 10.
Note: Issue isn't seen on Mac 10.14.1 and Ubuntu 14.04

As the issue is seen from M60(60.0.3112.0) considering it as Non-Regression and marking it as Untriaged.
From C#2, CC'ing scottmg@ for further inputs.
Status: WontFix (was: Untriaged)
The page uses a hard-coded width that makes assumptions about the text rendering mode. This never worked other than under very specific circumstances on a specific platform with specific settings. This is broken on linux, macos, chrome, and android on all chrome versions. 

Hard-coding pixel values like this for text is not a good idea.
#4 - but it uses white-space: pre-wrap, which means it should wrap, or am I missing something?
Ellipsizing the first line makes no sense in this scenario...
To give a little background:

This is based on a generated report.  The size of the various elements are defined as a template which is repeated for a data set.  Although my example does not set a height, there was a specific height set which easily can hold this amount of text.

I would think the proper behavior is that text in the div should show as much as possible, wrapping, and finally ellipsizing at the very end if the text can't fit.  The fact that this happens only with a specific text alignment, and in the middle of the text, is bizarre.

Sign in to add a comment