Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#12856 closed defect (fixed)

FilteringSelect: error with square brackets in default value

Reported by: Florian Owned by: Douglas Hays
Priority: high Milestone: 1.7
Component: Dijit - Form Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:



dijit.form.FilteringSelect? (and probably dijit.form.ComboBox?) do not set the default-value correctly if it starts with a square bracket.


<select dojoType="dijit.form.FilteringSelect">
	<option value="[alle Sachgebiete]" selected="selected">[alle Sachgebiete]</option>
	<option value="Angebot/Voranfrage">Angebot/Voranfrage</option>

I think the culprit is the CSS-selector in method fetchItemByIdentity in dijit/form/ComboBox.js (line 1194 in dojo 1.6.1), but I do not find the correct selector by myself.

fetchItemByIdentity: function(/*Object*/ args){
		// summary:
		//		Given the identity of an item, this method returns the item that has
		//		that identity through the onItem callback.
		//		Refer to for more details.
		// description:
		//		Given arguments like:
		//	|		{identity: "CA", onItem: function(item){...}
		//		Call `onItem()` with the DOM node `<option value="CA">California</option>`
//  ----> incomplete css-selector? 
		var item = dojo.query("> option[value='" + args.identity + "']", this.root)[0];
//  ----> end incomplete css-selector? 



p.s. version is 1.6.1, but it is missing in the select below

Change History (3)

comment:1 Changed 11 years ago by bill

Resolution: fixed
Status: newclosed

OK, just added a 1.6.1 for the version dropdown. Assuming the culprit is what you say, this should be fixed in 1.7 by my recent checkin to convert ComboBox to run against the new API. It doesn't have that dojo.query() call at all anymore.

comment:2 Changed 11 years ago by Florian

Hi Bill,

thanks for your answer. Is there no chance to get a fix for the 1.6 branch?


comment:3 Changed 11 years ago by bill

I doubt we'll have another 1.6 release, I assume you could monkey patch it by doing something like this in your code:

dijit.form.CheckBox.prototype. fetchItemByIdentity = ...
Note: See TracTickets for help on using tickets.