Closed
Bug 1341198
Opened 8 years ago
Closed 8 years ago
String doesn't break on all hyphens
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 809020
People
(Reporter: alberts, Unassigned)
Details
Attachments
(1 file)
384.15 KB,
video/mp4
|
Details |
I have a string with two hyphens. When reducing the width of the browser window, i.e. by using RDM, the string only wraps on the second hyphen ones hitting the window width. The first hyphen never wraps and a vertical scrollbar appears.
I have created a pen and a screencast to demonstrate the issue. The first string works as expected, the second string - which is closer to my original string - for some reason doesn't.
Codepen:
http://codepen.io/scheinercc/pen/PWMzeW
Updated•8 years ago
|
Component: HTML: Parser → Layout: Text
Comment 1•8 years ago
|
||
This is a known issue; we don't break if the hyphen is less than 6 chars from the edge of the word, because of the "conservative breaking" here:
https://dxr.mozilla.org/mozilla-central/rev/d0462b0948e0b1147dcce615bddcc46379bdadb2/intl/lwbrk/nsJISx4051LineBreaker.cpp#624-632
I think we really need to reconsider that code. Maybe ignore the 6-char "conservative zone" depending on the category or script of the adjacent characters.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 2•8 years ago
|
||
Thanks for clarifying. Weird behaviour IMHO, and not obvious at all. We now had to make the font size smaller (for all browser) in order to make the not wrapping text fit into the container, though I first was looking for errors in the code. Only after all other browsers were wrapping as expected I filed this bug.
You need to log in
before you can comment on or make changes to this bug.
Description
•