dijit.textarea fires onchange when loaded empty
Seems like there is a bug in the onChange trigger. When I set a onChange event publish with dojo/method it works fine when the textarea contains some text initially, but if it is empty it triggers the onchange event when the form is loaded. That can not be correct? I have tried with intermediateChanges="false" but it does not help.
This triggers onchange:
<code>
<textarea intermediateChanges="false" dojoType="dijit.form.Textarea" class="textInput" name="keywords" id="captions_keywords"></textarea>
</code>
This does not (note the underscore 'value') :
<code>
<textarea intermediateChanges="false" dojoType="dijit.form.Textarea" class="textInput" name="keywords" id="captions_keywords">_</textarea>
</code>
This might not be happening always, but in a form global onchange and inside an accordionwidget it does.
I have found a working solution: dojo.trim on line 73, like this:
this.value = this.formValueNode.value = dojo.trim(value);
Change History (4)
Cc: |
Douglas Hays removed
|
Milestone: |
1.0.3 →
1.1
|
Owner: |
set to Douglas Hays
|
Resolution: |
→ fixed
|
Status: |
assigned →
closed
|
Component: |
Dijit →
Dijit - Form
|
(In [11994]) Fixes #5551. Setting designMode=on was adding a <BR> tag to innerHTML so I went ahead and added this initially to keep the onChange from firing. Removed bottom padding from IE to remove the extra sace at the bottom. Removed empty text nodes. Changed IE line-height of inserted <p> tags to avoid rendering problems. Disabled textareas where still being submitted. Mirrored the disabled atribute in the hidden field.