Closed Bug 1160367 Opened 11 years ago Closed 10 years ago

Ellipsis truncation of LTR text in RTL container trims first letters (only shows last letters)

Categories

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

37 Branch
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: GrandpaNoah, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:37.0) Gecko/20100101 Firefox/37.0 Build ID: 20150415140819 Steps to reproduce: Go to http://jsfiddle.net/az2jqpn2/3/ It contains an LTR container element set to ave ellipsis truncation. Inside it is an LTR span with the text ABCDEFGHIJKLMNOPQRSTUVWXYZ Actual results: In Firefox 37.0.2 it Shows ...WXYZ Expected results: Should show ...ABCD as does Chrome, Safari and I'm pretty sure it was this way in FF 37.0.1 but don't have a way to vdowngrade to verify again now.
Reproduces in Firefox 37.0.2 on Mac. I believe this is a regression between Firefox 37.0.1 and 37.0.2.
Hi reporter, I have managed to reproduce this issue on the latest Firefox release (42.0) and on latest Nightly build (46.0a1-20151215030221). Tested also on 37.0.1, 37.0 and 36.0 and the behavior is the same. So I don't think it's a regression at this point. verified this also on Chrome and indeed the displayed letters are "...ABCD". Considering this I will mark this issue as NEW and set a component for it. If someone thinks that the chosen component is not right, please feel free to change it to a more appropriate one. Thanks for reporting this ! Paul
Status: UNCONFIRMED → NEW
Component: Untriaged → Layout: Text
Ever confirmed: true
Flags: needinfo?(mats)
I think our rendering is according to spec: https://drafts.csswg.org/css-ui/#text-overflow "This property specifies rendering when inline content overflows its line box edge in the inline progression direction of its block container element ("the block") ..." and "If there is one value, it applies only to the end line box edge." The end line box edge for the given example is on the left side. The ellipsing in Chrome makes no sense to me at all.
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: needinfo?(mats)
Resolution: --- → INVALID
Just some additional thoughts (agreeing with Mats that our behavior seems correct here)... Showing "…ABCD" is liable to trick the reader into thinking that "ABCD" is the END of some text that has been truncated at its beginning. Note that if ellipsis truncation is not enabled, both Firefox and Chrome will show the *last* few characters of the text. ISTM that it's natural to expect that introducing the ellipsis will not drastically change the portion of the text that's visible; it will display "…" at the trailing edge (according to the containing block's direction), replacing a bit of the text, but otherwise layout will be unchanged. That's what Gecko is doing, whereas in Blink (or Webkit) introducing the ellipsis does not just render "…" to indicate that truncation has occured; it causes a completely different part of the text to become visible. Furthermore, the behavior of Blink/Webkit becomes seriously weird in a slightly more complex example; try http://jsfiddle.net/az2jqpn2/4/ in Safari or Chrome. With this example, Safari displays something like "…AB◼︎Z", which seems highly misleading. (Firefox displays "…XY◼︎Z", which makes much better sense IMO.)
You need to log in before you can comment on or make changes to this bug.