Open Bug 803833 Opened 12 years ago Updated 2 years ago

text-overflow fails to stick ellipsis to last visible character when truncating over whitespace

Categories

(Core :: Layout: Text and Fonts, defect)

19 Branch
x86
macOS
defect

Tracking

()

UNCONFIRMED

People

(Reporter: tdd, Unassigned)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.16 (KHTML, like Gecko) Chrome/24.0.1297.0 Safari/537.16 Steps to reproduce: We defined a short-width no-wrap text-overflow: ellipsis paragraph. See a live example in situation 1 on: http://codepen.io/anon/pen/Dyotz Actual results: It rendered "properly", except the truncation ellipsis failed to ignore the whitespace that was the last visible char, so it appeared *after a whitespace*, which makes no typographical sense Expected results: It should have stuck to the last visible char, not the whitespace. For instance, Opera does this right.
I'm not convinced this behavior is wrong. I don't see why we should discard the space if there's room for it to appear; by doing so, it becomes less clear whether the last (visible) word is shown fully or has been truncated mid-word. With the space before ellipsis, it's clear that the last word is complete, but that there is additional text after the space. FWIW, Chrome seems to behave the same as Firefox here.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.