View Full Version : Shrinking Resizable Textarea

6 Aug 2007, 10:49 AM
When the resizable is applied to my textarea, the size is set to width:0 height: 20

I have some textareas which are dynamically rendered.

Then this PHP code iterates over a list of the field ids, which are stored in $a_field_list

echo '<script type="text/javascript">';
echo 'var ResizableText = {
init : function() {';
$i = 0;
foreach ($a_field_list as $s_field)

echo 'var res_'. $i . ' = new Ext.Resizable(\''. $s_field . '\', {
width: 300,
height: 25,
minWidth: 300,
minHeight: 25,
wrap: true,
pinned: true
echo ' }
Ext.EventManager.onDocumentReady(ResizableText.init, ResizableText, true);';
echo '</script>';

When the form loads the fields are their correct size. The resize handles appear and the textarea is set to:
style="width: 0px; height: 20px; position: static;"

width 0 height 20px is clearly not good. If I drag the resize handle it will size a bit. When it sizes it is clearly sizing relative to the size of the div and the resize handles. If I have fields set to display: none they get their resizable set properly, and changing their display to "block" allows them to be used as per normal.

Ideas anyone? I've toyed with the general options for resizable, made sure firebug has the ext-all.css listed, etc.