Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#17230 closed defect (wontfix)

ComboBox Unusable if you use queryExpr: '*${0}*'

Reported by: George Sexton Owned by: Douglas Hays
Priority: undecided Milestone: tbd
Component: Dijit - Form Version: 1.9.0
Keywords: Cc:
Blocked By: Blocking:

Description

The combo box highlight algorithm is really messed up if you use the query expression * ${0}* Create a combo box with these elements:

<label for=IDLocationName>Name</label></th><td> <select data-dojo-props="queryExpr: '*${0}*'" data-dojo-type="dijit/form/ComboBox" id="IDLocationName" name="location_name" value="" > <option value="2">Bluebird Theater <option value="7">Mile High Stadium <option value="3">Ogden Theater <option value="8">Paramount Theater <option value="9">Red Rocks Amphitheatre <option value="10">The Crossing Church <option value="1">The Pepsi Center </select> Type: R (pause) e (pause) d Expected behavior: "Red Rocks" should be selected. Observed behavior: The combo box contains "Bed"

Type "The" (now pause) and type "P" Notice that you get "Blu P", not "The Pepsi Center" as expected.

I've got a sample page at:

http://www.mhsoftware.com/caldemo/ComboBoxDemo.html

that demonstrates this.

Change History (5)

comment:1 Changed 6 years ago by bill

Component: GeneralDijit - Form
Owner: set to Douglas Hays

comment:2 Changed 6 years ago by George Sexton

I'm not really sure this is valid. I set the property for autoComplete=false, and I'm getting much more of what I expect. If you agree, please let me know how I could submit my code as an example.

comment:3 Changed 6 years ago by Douglas Hays

Resolution: wontfix
Status: newclosed

The highlighting is done in a plain INPUT box. It's beyond the ability of the INPUT box to have more than 1 highlighted area. When you use contains, then you can have many unmatched areas, so autocomplete=false has to be used with contains.

comment:4 Changed 6 years ago by George Sexton

How would I submit a documentation update for the API docs so that queryExpr clearly documents this?

comment:5 Changed 6 years ago by bill

Thanks, it would be a pull request, see https://github.com/dojo/dijit/blob/master/CONTRIBUTING.md for details.

Note: See TracTickets for help on using tickets.