Archive for March, 2008

Strange TextArea Bug

For a while now, my Ruby application has been plagued with a strange bug in text area fields. Whenever a user updated text in a text area field, 5 spaces would be prepended to the text. If the user hit the update field a few times, you would see the text scoot along to the right 5 spaces at a time. Very strange indeed.

For a while, I thought the problem was somwhere in my CSS file. But, the solution was found by using a Ruby tag instead of the equivilent HTML tag in my Views files.

Replace this:

{text_area_tag("table[column]", @table.column, :size => "100x15")}

With this:

{textarea rows="15" name="table[column]" cols="100"}
{%= @table.column %}
{/textarea}

Add comment March 19th, 2008


RSS Berkman Gender & Tech

RSS Tweets

Tags

Meta