Opened 7 years ago

Closed 7 years ago

#16015 closed defect (worksforme)

dijit.form.FilteringSelect 'query' is null or is not an object IE8

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

Description

this is how this appended to me:

<script type='text/javascript'>

new dijit.form.FilteringSelect?({tabIndex:10,required:true,name:'strIdioma',style:{width:"95%","max-width":"180px"}},"strIdioma");

</script>

somewhere at html...

<select name="strIdioma" id="strIdioma" class="select">

<option><%=tags.getString("estudiossociales.-seleccione-")%></option> <option value="1"><%=tags.getString("es.espaniol")%></option> <option value="2"><%=tags.getString("es.ingles")%></option> <option value="3"><%=tags.getString("es.portuges")%></option>

</select>

it works perfectly on IE9 and Chrome 21+, by using IE8 inmediatly after the JS line i get "'query' is null or is not an object IE8", i debugged a little and the thing is breaking at line 26, here:

_callbackSetLabel:function(_1,_2,_3){

if((_2&&_2.query[this.searchAttr]!=this._lastQuery)
(!_2&&_1.length&&this.store.getIdentity(_1[0])!=this._lastQuery)){ /<---------- here

return;

}

if(!_1.length){

this.valueNode.value="";

dijit.form.TextBox?.superclass._setValueAttr.call(this,"",_3
(_3===undefined&&!this._focused));

this._set("item",null); this.validate(this._focused);

}else{

this.set("item",_1[0],_3);

}

},

it seems that a _2 has a 'function' as a value instead of an object (getDispatcher value), i fixed the thing by doing this...

_callbackSetLabel:function(_1,_2,_3){

try {

if(dojo.isIE == 8 && _2) {

_2 = _2();

}}catch(e){}

try {

if((_2&&_2.query[this.searchAttr]!=this._lastQuery)
(!_2&&_1.length&&this.store.getIdentity(_1[0])!=this._lastQuery)){

return;

}

}catch(e){} if(!_1.length){

this.valueNode.value="";

dijit.form.TextBox?.superclass._setValueAttr.call(this,"",_3
(_3===undefined&&!this._focused));

this._set("item",null); this.validate(this._focused);

}else{

this.set("item",_1[0],_3);

}

}

i know this is not correct, ill wait for any answer...

greetings,

Attachments (1)

16015.html (852 bytes) - added by Douglas Hays 7 years ago.
working testcase

Download all attachments as: .zip

Change History (2)

Changed 7 years ago by Douglas Hays

Attachment: 16015.html added

working testcase

comment:1 Changed 7 years ago by Douglas Hays

Resolution: worksforme
Status: newclosed

I'll need a failing standalone testcase. I've attached my testcase that shows it working.

Note: See TracTickets for help on using tickets.