Closed
Bug 1302251
Opened 8 years ago
Closed 8 years ago
Hyphen line break behavior is unexpectedly not doing what the docs say
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 809020
People
(Reporter: jonasthiem, Unassigned)
Details
Attachments
(1 file)
(deleted),
image/png
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0
Build ID: 20160909004004
Steps to reproduce:
Currently, firefox hyphen line break behavior is nonsensical and not doing what the docs say:
­ works as expected. It inserts a line break opportunity the browser clearly uses.
However, https://developer.mozilla.org/en/docs/Web/CSS/hyphens clearly states U+2010 / ‐ / ‐ is supposed to be a visible line break opportunity.
... except that firefox completely ignores it and only breaks at ­ points which is super silly and inconsistent, and then it even renders ‐ and ­ line break hyphens _completely different_ in some occasions, breaking the expected hyphen support even more.
Are people supposed to only be able to line-break words where there AREN'T actually dashes in the word? So "hands-on" can't have a reasonable line break? If not, this should probably be fixed.
Reporter | ||
Comment 1•8 years ago
|
||
TL;DR: docs say hyphens work like ­ but they simply don't do that at all, and to add insult to injury they even look completely different for no obvious reason.
Reporter | ||
Updated•8 years ago
|
Summary: Hyphen line break behavior is nonsensical and not doing what the docs say → Hyphen line break behavior is unexpectedly not doing what the docs say
Reporter | ||
Comment 2•8 years ago
|
||
The previous title was quite judgemental, I changed it. Sorry about that. I had spend a while reading the docs and frustrating myself with line break behavior, but that's still not an acceptable reason for bad tone in bug reports.
Also, if I just misread the docs somehow or made a mistake (which is easily possible) and this isn't actually a bug, feel free to tell me about the silly things I have done :-)
Comment 3•8 years ago
|
||
I can reproduce this. It does not break-line when words contain dashes as mentioned by the reporter.
--
Version 51.0a1
Update Channel nightly
User Agent Mozilla/5.0 (X11; Linux i686; rv:51.0) Gecko/20100101 Firefox/51.0
Status: UNCONFIRMED → NEW
Component: Untriaged → Layout
Ever confirmed: true
Product: Firefox → Core
Updated•8 years ago
|
Component: Layout → Layout: Text
Flags: needinfo?(xidorn+moz)
Comment 4•8 years ago
|
||
This is the same issue as described in bug 809020.
More specifically, it does not break at explicit hyphens if they occur within 6 characters of the start or end of the word. If you have a sufficiently-lengthy hyphenated word (like that!) then the hyphen _will_ be used as a potential break point.
This happens because when we're within the "conservative" range here:
https://dxr.mozilla.org/mozilla-central/rev/17242152a8fbe65f20b864bd5a577b0dff624857/intl/lwbrk/nsJISx4051LineBreaker.cpp#614-622
hyphens are not seen as breakable.
This is also the cause of the odd behavior reported in bug 745517 (see the testcase there).
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Updated•8 years ago
|
Flags: needinfo?(xidorn+moz)
You need to log in
before you can comment on or make changes to this bug.
Description
•