Closed Bug 92851 Opened 19 years ago Closed 10 years ago

wrap=virtual in a TEXTAREA element doesn't wrap in mid-word

Categories

(Core :: Layout: Form Controls, defect, P3)

x86
Windows 98
defect

Tracking

()

RESOLVED WORKSFORME
mozilla1.5beta

People

(Reporter: tripinogen, Assigned: kinmoz)

References

(Depends on 1 open bug, Blocks 2 open bugs, )

Details

Attachments

(2 files)

Steps to reproduce:
1) go to www.mozillazine.org
2) enter any talkback, scroll down to the "new post" form and enter some text
in the TEXTAREA element: 

<textarea NAME="body" COLS="40" ROWS="8" WRAP="virtual"></textarea>

Actual Results:
The text doesn't wrap. It scrolls horizontally, instead.

Expected Result:
The text should wrap as in IE or Netscape 4.x

I'm using mozilla 0.9.2 on windows 98

Bye
wfm Win2k 20010728
worksforme, build 2001-07-30-06 on Linux.

Could you please try a recent nightly or 0.9.3 once it comes out?
wfm win98, 2001072808 trunk. "Words" longer than the width of the textarea are
not broken, though, and cause horizontal scrolling. Can't say if that's correct
behavior or not since it's a nonstandard extension. Also tested with 0.9.2, same
results.
reporter: Could you give explicit steps (as to what to type) on how to reproduce
this "bug"?
Put a long string with no spaces. In IE, the text always wraps, but in
mozilla 0.9.2 the text scrolls horizontally. If a text with spaces is
entered, it wraps correctly. I didn't know that wrap=virtual
was a nonstandard extension, so I don't know if this is the correct behaviour
of this type of textarea.
The WRAP attribute can be used to specify how to handle word-wrapping display 
in text input areas in forms. 

<TEXTAREA WRAP=OFF> -- the default setting - Wrapping doesn't happen. Lines are 
sent exactly as typed.
<TEXTAREA WRAP=VIRTUAL> -- The display word-wraps, but long lines are sent as 
one line without new-lines.
<TEXTAREA WRAP=PHYSICAL> -- The display word-wraps, and the text is transmitted 
at all wrap points. 

NOTE : Internet Explorer (version 3.0), by default wraps text in a <TEXTAREA> 
box, while Internet Explorer 4.0 supports the WRAP attribute. Also, these 
values have changed in Netscape 4.0 and Internet Explorer 4.0 and above to 
WRAP="off|soft|hard" respectively.

(Courtesy HTML Reference Library (c) Stephen Le Hunte -- you can find this 
excellent reference using Google or by pressing F1 in Allaire HomeSite.)
confirming

it seems that this works in ns4 (tested on win32,linux and mac). I'm not sure if
this has been dealt with in another bug before (couldn't find one).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: 4xp
*** Bug 104592 has been marked as a duplicate of this bug. ***
->>
Assignee: rods → kin
An additional information to the wrapping in textareas: 

When specifying a cols="..."-value the wrap="off" is not interpreted. See the
attachment that will follow. (Using mozilla0.9.6/Linux)
Oops, sorry, please compare bug 50633
dup 

*** This bug has been marked as a duplicate of 50633 ***
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
This is not a duplicate.  In fact it's almost the opposite bug.  In bug 50633 
the text wraps when it's not supposed to.  Here it does not wrap when it should.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
*** Bug 116959 has been marked as a duplicate of this bug. ***
Just jotting down some notes so that when I actually get to fix this bug, I can 
try and nail all the current problems:

There are 5 possible values for wrap:

1. "off" - no wrapping at all, users must scroll to see lines that don't fit.
2. "hard" - lines and words extending past col max are wrapped. Output has
   extra newlines inserted into it to reflect wrapping on screen.
3. "physical" - same as "hard".
4. "soft" - lines and words extending past col max are wrapped. Output is *not*
   modified.
5. "virtual" - same as "soft".


Current problems I see with my 01/28/02 Debug build:


1. wrap=off - Still allows a soft wrap of lines exceeding the col max.

2. wrap=soft|virtual|hard|physical - Should always wrap long lines and words
   that extend over the col limit. Right now long words are not forced to wrap.

3. wrap=physical - Should output just like wrap=hard, but it's currently
   outputing wrap=soft because of code in
   nsFormControlHelper::GetWrapPropertyEnum() which is mapping physical to soft.

4. wrap=off - Should always display horiz and vert scrollbars.

5. wrap=soft|virtual|hard|physical - Should always display vert scrollbars.
Status: REOPENED → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla1.0
> 3. wrap=physical - Should output just like wrap=hard, but it's currently
>   outputing wrap=soft because of code in

See bug 77110.  Basically, no existing browser that's at all widely used treats
"physical" as "hard"

This testcase shows how Javascript introduces spurious linebreaks when writing
a long string to a textarea with wrap="virtual"
Moving to Mozilla 1.1. Engineers are overloaded with higher priority bugs.
Target Milestone: mozilla1.0 → mozilla1.1
See also bug 50633.  It has additional info.
Hi,

When I send something from this textarea (wrap=virtual) on few lines, reoult
format is only 1 long line.

It's on PC/Linux Mozilla 1.0 (ID: 2002052918)

bye
PaD
Target Milestone: mozilla1.1alpha → mozilla1.1beta
Target Milestone: mozilla1.1beta → mozilla1.3alpha
I couldn't get mozilla to wrap text for me using this line of code:

<textarea name="modwiz_form[arg_text]" STYLE="width:550px; height:250px" wrap=soft>
blah 
</textarea>

By adding cols=x the textarea retained the deffined width of the style and
wrapping worked as expected.

<textarea name="modwiz_form[arg_text]" cols=1 STYLE="width:550px; height:250px"
wrap=soft>
blah 
</textarea>
andy, that would be bug 119915, not this bug.
Target Milestone: mozilla1.3alpha → mozilla1.4alpha
I am experiencing this bug in Chimera 0.6. 

As I mentioned in bug 189103, I suspect there's some weird interaction with
Chimera and some other (as yet unidentified) bit of software on my system that
is bringing this bug to the surface, as I hadn't seen it until recently.
Target Milestone: mozilla1.4alpha → mozilla1.5alpha
Target Milestone: mozilla1.5alpha → mozilla1.5beta
Blocks: 212456
FYI, I just attached a patch (attachment 127892 [details] [diff] [review]) to bug 104674 which allows us
to wrap words that exceed the content area width which could be used to address
problem 2 described in comment 16 above.
*** Bug 213167 has been marked as a duplicate of this bug. ***
Depends on: 104674
Summary: wrap=virtual in a TEXTAREA element doesn't work as expected → wrap=virtual in a TEXTAREA element doesn't wrap in mid-word
*** Bug 257466 has been marked as a duplicate of this bug. ***
(In reply to comment #27)
> *** Bug 257466 has been marked as a duplicate of this bug. ***

(In reply to comment #25)
> FYI, I just attached a patch (attachment 127892 [details] [diff] [review]) to bug 104674 which allows us
> to wrap words that exceed the content area width which could be used to address
> problem 2 described in comment 16 above.

Textareas still don't wrap right. If there are no spaces in a line the wrapping
is broken.

Example below:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
wrap=hard still doesn't break long words.
Duplicate of this bug: 271055
Flags: blocking1.9?
Flags: blocking1.9? → blocking1.9-
QA Contact: madhur → layout.form-controls
WFM as of Gecko/20090824 Firefox/3.5.3. Text properly wraps mid-word in wrap="virtual" (actually any wrap that's not "off").
Status: ASSIGNED → RESOLVED
Closed: 18 years ago10 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.