#6469 closed defect (fixed)
[patch] FilteringSelect: newlines in inline data not trimmed
Reported by: | Owned by: | haysmark | |
---|---|---|---|
Priority: | high | Milestone: | 1.2 |
Component: | Dijit - Form | Version: | 1.1.0 |
Keywords: | Cc: | Jared Jurkiewicz | |
Blocked By: | Blocking: |
Description
I study along with The Dojo Book and program in the MyEclipse?. I learn Example 2 - The Postman Always Clicks Twice. When I program FilteringSelect?, the problem occured. At first, my code is: <select id="option1" dojoType="dijit.form.FilteringSelect?">
<option value="pop3">POP3</option> <option value="imap">IMAP</option>
</select> It has work well. But when I format using MyEclipse?'s Format functionality, my code changes to: <select id="option1" dojoType="dijit.form.FilteringSelect?">
<option value="pop3">
POP3
</option> <option value="imap">
IMAP
</option>
</select> It doesn't work well. Note: Carriage Return appear alongside "POP3" and "IMAP". I guess this is a bug of Dojo 1.0.0. Because of I'm a Chinese, I don't be easy to login in this web site. Whether this is a bug or not, please notify me using Email. Thanks a lot. My email address: [email protected]…
Attachments (2)
Change History (12)
comment:1 Changed 13 years ago by
Component: | HTML → Dijit |
---|---|
Milestone: | → 1.2 |
Owner: | changed from sjmiles to bill |
Priority: | highest → normal |
Reporter: | changed from guest to [email protected]… |
Summary: | FilteringSelect doesn't work → FilteringSelect: newlines in inline data not trimmed |
comment:2 Changed 13 years ago by
Cc: | Jared Jurkiewicz added |
---|---|
Owner: | changed from bill to haysmark |
I am also getting this behavior with dojo.data. In states.json, if you write:
{name:"\nAlaska\n", label:"Alaska",abbreviation:"AK"},
Alaska will vanish from the ComboBox? list (dojo.data does not return it in the result list). The item is in the store, but even a query for '*' does not match it.
I say this because I noticed a mixin to our store I don't remember:
//Mix in the simple fetch implementation to this class. dojo.extend(dijit.form._ComboBoxDataStore,dojo.data.util.simpleFetch);
So maybe if we can figure this out for dojo.data the rest will follow.
comment:3 Changed 13 years ago by
Hmm, that does sound like a bug in the dojo.data library functions, but regardless of that, it seems like if a developer accesses an item from ComboBoxDataStore (perhaps by accessing ComboBox.item), it would be bad for it to contain newlines like:
{name:"\nAlaska\n", label:"Alaska",abbreviation:"AK"}
I just figured we should trim the data from each <option> tag.
Changed 13 years ago by
Attachment: | 6469.dijit.patch added |
---|
Fixes #6469. Strip option tags of newlines; users usually don't intend for them to be there.
Changed 13 years ago by
Attachment: | 6469.dojo.patch added |
---|
Refs #6469. Enable dojo.data to match against values containing newline characters.
comment:4 Changed 13 years ago by
Status: | new → assigned |
---|
I've attached two patches: one for ComboBoxDataStore? and one for dojo.data. I thought it would be good if dojo.data could match values even if they contained newlines.
comment:5 Changed 13 years ago by
I ran the dojo.data patch against the doh tests in dojo and dojox on Firefox 2, IE 7, and Safari 3.1 and they all passed.
comment:6 Changed 13 years ago by
Summary: | FilteringSelect: newlines in inline data not trimmed → [patch] FilteringSelect: newlines in inline data not trimmed |
---|
comment:7 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:9 Changed 13 years ago by
comment:10 Changed 10 years ago by
Component: | Dijit → Dijit - Form |
---|
Changing bug summary to be more descriptive than "doesn't work". Note that every ticket is about something that doesn't work.
Looks like a simple fix to dijit.form._ComboBoxDataStore.