Closed Bug 587272 Opened 15 years ago Closed 2 months ago

text wrap in chat area (when a number of spaces is input)

Categories

(Other Applications Graveyard :: ChatZilla, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: svetlana, Assigned: samuel)

Details

Attachments

(3 files)

Steps to reproduce: In a channel, say " ." (a number of spaces and a "."). Current behavior: A horizontal scrollbar appears at chat area bottom, with the message exceeding screen width. Expected behavior: No scrollbar should have appeared. Text wrap should have occurred properly.
This might be a problem with Gecko itself.
Some additional infos: W3C says: http://www.w3.org/TR/CSS2/text.html#white-space-model 16.6.1 The 'white-space' processing model says: > If 'white-space' is set to 'pre' or 'pre-wrap', any sequence of spaces > (U+0020) unbroken by an element boundary is treated as a sequence of > non-breaking spaces. However, for 'pre-wrap', a line breaking opportunity > exists at the end of the sequence. so the new behavior of pre-wrap fits to this rule. the pure word and his postfix whitespaces are 1 unit. But: > If spaces (U+0020) or tabs (U+0009) at the end of a line have > 'white-space' set to 'pre-wrap', UAs may visually collapse them. so the last few whitespaces immediately before the EOL may be collapsed. (in the testcase the spaces between the bbb-link and EOL). But w3c says "may" and not "must" so not sure if it is a bug or maximum a minor one. *********** http://www.w3.org/TR/2010/WD-css3-text-20101005/#word-wrap 6.2. Emergency Wrapping: the ‘word-wrap’ property this is the new property which one handles the annoyed overflow effect (with horizontal scrollbar) of long words. (the right side in the testcase) ********* Backwards compatibility tests via screenshot were added to testcase to compare.
patch on output-base.css to fix the overflow effect with horizontal scrollbar.
Attachment #511620 - Flags: review?(samuel)
This patch adds a new munger to split long whitespace the same way we split long words. We could add the new CSS rule as well for future use.
Assignee: rginda → samuel
Status: NEW → ASSIGNED
Attachment #518912 - Flags: review?
Attachment #518912 - Flags: review? → review?(silver)
Comment on attachment 518912 [details] [diff] [review] split whitespace the same way we do long words Apparently we don't support Gecko <1.9.1 so this isn't needed.
Attachment #518912 - Flags: review?(silver) → review-
Attachment #511620 - Flags: review?(samuel) → review+
Comment on attachment 511620 [details] [diff] [review] patch - word-wrap: break-word Apparently, despite claims other on this bug, this doesn't actually work AT ALL.
Attachment #511620 - Flags: review+ → review-
per discuss on chat in 2011-03-12 the word-wrap:break-word doesn't work on table cells (see Bug 587438) only on div elements. to apply word-wrap the only 1 way is adding a nested div element into the .msg-data td and using hardcoded constant overdefinition for the width css property. However Samuel Sieb's attachment 518912 [details] [diff] [review] is better way, no hardcoding, more backwards compatibility, because works on Gecko1.9.0 too (although bcomp is not nessesary from now if <Gecko1.9.1 is not supported anymore) word-wrap:break-word on table-cell will be useful only after fixing Bug 587438
We can work-around this with table-layout: fixed; property, and use on td the word-wrap: break-word testcase: https://jsfiddle.net/utasir/5bruersj/ idk how we didnot find this solution earlier. Well -moz-min-content is 1year old only so far.
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → INCOMPLETE
Product: Other Applications → Other Applications Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: