Opened 12 years ago

Closed 12 years ago

Last modified 8 years ago

#5414 closed defect (worksforme)

dojo textarea widget does not preserve line feeds in IE6

Reported by: guest Owned by: Douglas Hays
Priority: high Milestone:
Component: Dijit - Form Version: 1.0
Keywords: Cc: rtweed@…
Blocked By: Blocking:

Description (last modified by bill)

Browser: IE6.0.2900 OS: Windows XP SP2

The textarea widget allows you to add new lines by hitting the Enter key. On submitting the form, these get Posted OK to the back-end. However, if you then re-render the textarea with a value containing new lines, IE6 does not preserve them.

ie if you have:

<div dojoType="dijit.form.Textarea" name="comments" style="width:300px">
Line 1
Line 2
Line 3
</div>

This is rendered properly with line feeds in Firefox and Safari, but IE6 will show:

Line 1 Line 2 Line 3

in the textarea box.

See http://www.mgateway.com/php/dojo/test3.php

Change History (4)

comment:1 Changed 12 years ago by bill

Description: modified (diff)
Owner: set to Douglas Hays

How about if you use a <textarea> node to instantiate it rather than a <div>? Like:

<textarea dojoType="dijit.form.Textarea" name="comments" style="width:300px">
Line 1
Line 2
Line 3
</textarea>

comment:2 Changed 12 years ago by guest

<textarea> works a treat! Many thanks!

However the documentation says to use a <div> so you probably ought to change that. See:

http://www.dojotoolkit.org/book/dojo-book-0-9/part-2-dijit/form-validation-specialized-input/resizeable-text-area

comment:3 Changed 12 years ago by bill

Resolution: worksforme
Status: newclosed

Great. OK, I just updated the book w/this info.

comment:4 Changed 8 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.