Closed Bug 302710 Opened 19 years ago Closed 19 years ago

Dynamic wrapping of textarea doesn't work (works fine in IE)

Categories

(Toolkit :: Form Manager, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 41464

People

(Reporter: jerome, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6

The following URL above (http://www.provensal.com/tawrap_bug.html) demonstrates
the bug.
Using the Wrap Option pulldown one can change the wrapping behavior of the
textarea dynamically.
The wrap attribute seems to be a fairly recent standard although it's been
around for years as a non-standard:
  http://www.w3.org/Submission/web-forms2/#extensions1

FYI, it is working fine with IE.

Reproducible: Always

Steps to Reproduce:
1. Load http://www.provensal.com/tawrap_bug.html
2. Select the 'Off' option in the Wrap Option pulldown

Actual Results:  
1. nohting happens while the text in the textarea should have wrapped
differently when the 'Off' option selected
2. rows option works fine and allows to change the size of the textarea dynamically.


Expected Results:  
The "Off" wrap mode should have kicked in and a horizontal scrollbar should have
appeared.
Check IE to see what the right result s/b.
Related to/duplicate of Core bug 99457?
I think that bug 41464 or bug 159979 is more appropriate.

The following inefficient code can workaround this bug:

textarea.setAttribute("wrap", "off");
var parNod = textarea.parentNode, nxtSib = textarea.nextSibling;
parNod.removeChild(textarea); parNod.insertBefore(textarea, nxtSib);
The workaround did the trick for me and it works both in IE and Firefox.
Many thanks to shutdown@flashmail.com 

*** This bug has been marked as a duplicate of 41464 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.