henchmanc / chrome-toolbox

Automatically exported from code.google.com/p/chrome-toolbox
0 stars 0 forks source link

Saving a form with at least one populated textarea fails (fix included) #170

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Fill a form with at least one textarea populated
2. Try save via "SAve form data"

What is the expected output? What do you see instead?
No output, data should be saved.
Instead, an error message in console

What version of the product are you using? On what operating system?
Chrome Toolbox v1.0.32 / Archlinux-64

Please provide any additional information below.
The problem lies at the line depicted here:
https://code.google.com/p/chrome-toolbox/source/browse/trunk/src/form.js?r=254#6
7

As you can see, referencing the textarea should be done via the "j" index, 
instead, the array of textarea refs is being tested itself the the "readonly" 
attribute.

The line:
if (textareas[j].value != '' && !textareas.getAttribute('readonly')) 

should read this instead:
if (textareas[j].value != '' && !textareas[j].getAttribute('readonly'))

Original issue reported on code.google.com by manuel....@gmail.com on 25 Feb 2013 at 3:13