Opened 7 years ago

Closed 7 years ago

#16555 closed defect (worksforme)

Select:   in store can break order of items

Reported by: Bob Tarling Owned by: Douglas Hays
Priority: undecided Milestone: tbd
Component: Dijit - Form Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

In order to work around #9973 I have am using   instead of a blank option when populating a Select control.

This works fine in all browsers I have tested (IE8, IE9, FireFox and Chrome).

However when using an ItemFileReadStore this works for all browser except Chrome. On Chrome the order in which the options are defined in the json structure is not adhered to.

I considered adding this as a note to #9973. If that defect is fixed there will be no issue for me as I can remove nbsp. However the root cause of this defect may surface in other ways and you may wish to investigate this separately.

Attachments (2)

simplepicklist.html (1.5 KB) - added by Bob Tarling 7 years ago.
Example HTML shows working Select and failing select with store
countriesblank.json (841 bytes) - added by Bob Tarling 7 years ago.
json file to loaded by example HTML

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by Bob Tarling

Attachment: simplepicklist.html added

Example HTML shows working Select and failing select with store

Changed 7 years ago by Bob Tarling

Attachment: countriesblank.json added

json file to loaded by example HTML

comment:1 Changed 7 years ago by bill

Component: DijitDijit - Form
Description: modified (diff)
Owner: changed from bill to Douglas Hays
Summary: Select control -   in store can break order of itemsSelect:   in store can break order of items

So on Chrome, the first example in simplepicklist.html works, but the second has a weird order of choices?

comment:2 Changed 7 years ago by Bob Tarling

bill said:

So on Chrome, the first example in simplepicklist.html works, but the second has a weird order of choices?

Yes, that is correct. The first item (&nspb;) gets moved to 2nd row and some seemingly random item gets moved to first row)

BTW - how can I add myself to cc on defects?

comment:3 Changed 7 years ago by Bob Tarling

Note that I have this deployed here if you want to see the effect using Chrome without going to the trouble of deploying yourself - http://www.jbob.co.uk/simplepicklist.html

The top control is a picklist with hardcoded choices that looks fine on all browsers The control below that has exactly the same items but from a store. That does not look good on Chrome

comment:4 in reply to:  2 Changed 7 years ago by bill

Replying to bobtarling:

BTW - how can I add myself to cc on defects?

You just write your name in the CC field. Maybe you don't have permission? Regardless, you will automatically get CC'd on tickets you wrote, assuming that you registered your email in trac.

comment:5 Changed 7 years ago by Douglas Hays

Resolution: worksforme
Status: newclosed

Just add sortByLabel="false" (default is true).

Note: See TracTickets for help on using tickets.