Closed Bug 64626 Opened 24 years ago Closed 24 years ago

Line doesn't break on soft-hyphenated words (­)

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 9101

People

(Reporter: mark.slater, Assigned: clayton)

Details

(Keywords: testcase)

Attachments

(3 files)

When Mozilla encounters a hyphenated word at the end of a line, it takes the 
whole word on to the next line, instead of breaking at the hyphen.

Adding attachment, line should break at "par-"
I see this in Mozilla Build 2001010720 in WinNT, but Netscape 4.75 displays the
text in the same way.
IE 5.5 does break on the -

From reading the htm 4 specification I think Mozilla's and Netscape's behaviour
is correct and IE 5.5 is incorrect.

According to the html 4 specification:
(http://www.w3.org/TR/1998/REC-html40-19980424/struct/text.html#h-9.3.2)

"In HTML, there are two types of hyphens: the plain hyphen and the soft hyphen.
The plain hyphen should be interpreted by a user agent as just another
character. The soft hyphen tells the user agent where a line break can occur.

Those browsers that interpret soft hyphens must observe the following semantics:
If a line is broken at a soft hyphen, a hyphen character must be displayed at
the end of the first line. If a line is not broken at a soft hyphen, the user
agent must not display a hyphen character. For operations such as searching and
sorting, the soft hyphen should always be ignored.

In HTML, the plain hyphen is represented by the "-" character (- or -).
The soft hyphen is represented by the character entity reference ­ (­
or ­) "
Okok, a new testcase, same thing except with the "&shy" instead of a "-". Same 
thing happens - mozilla takes the whole word, stuffs it on the next line. A 
different browser, which enjoys near-monopolistic dominance, takes the word 
apart, placing one part on one line, the other part on the next line.
Attached file Another testcase
My mozilla, Linux build 2000112406, doesn't show the hyphen at all. Attaching
screenshot.
I also can't see the hyphen when ­ is used in build 2001010720 in WinNT.
­ and ­ don't work either.

IE 5.5 doesn't show the hyphen either for ­ but does show it for ­ and
­

layout?
Assignee: asa → clayton
Status: UNCONFIRMED → NEW
Component: Browser-General → Layout
Ever confirmed: true
Keywords: testcase
QA Contact: doronr → petersen
Timeless just beat me in confirming the bug and changing the component :)
Anyway, here's the rest of my comments I was writing before the mid air collision:
A quick look at the spec seems to imply that supporting soft-hyphens is optional "Those 
browsers that interpret soft hyphens must observe the following semantics...", therefore 
mozilla isn't breaking any standards by failing to support this at the moment, however as 
Mozilla wants to fully support the standard then I do agree that this should be supported.

Modified the subject to indicate that this bug is now focused on soft hyphens rather than 
plain hyphens because Mozilla works as the spec dictates with the plain hyphen.
OS: Windows NT → All
Hardware: PC → All
Summary: Line doesn't break on hyphenated words → Line doesn't break on soft-hyphenated words (­)
If this bug wants to be about soft hyphens, then it's a duplicate of bug 9101.

*** This bug has been marked as a duplicate of 9101 ***
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
Summary: Line doesn't break on soft-hyphenated words (­) → Line doesn't break on soft-hyphenated words (­)
I ain't gonna give up without a fight! >:)

If I have a table cell set to 100px width, and write "yippidee-yappedee-doodat-
holy-smokes-there-goes-my-layout" in it, mozilla will completely destroy the 
site. Something a lot of people won't like, W3C standards or not.
Possibly time for discussion on the newsgroups I think :)

I think netscape.public.mozilla.layout is an appropriate place. I'm messing about with BeOS 
today so won't be checking the groups, but discussing matters on the newsgroup is the best 
way to decide upon new features particularly if they go against the standards.

If the W3C had a good reason for making the spec like they did, someone must know why.
The correct place for discussing issues with the HTML spec is www-html@w3.org,
see the W3C website http://www.w3.org/MarkUp/
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: