Changeset 8927
- Timestamp:
- 06/05/07 10:46:39 (19 months ago)
- Location:
- dijit/trunk
- Files:
-
- 2 modified
-
form/ComboBox.js (modified) (5 diffs)
-
tests/form/test_FilteringSelect.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
dijit/trunk/form/ComboBox.js
r8926 r8927 331 331 //this.parentClass.onblur.apply(this, arguments); 332 332 }, 333 333 334 334 _announceOption: function(/*Node*/ node){ 335 335 // summary: … … 342 342 this.focusNode.value=newValue; 343 343 }, 344 344 345 345 _selectOption: function(/*Event*/ evt){ 346 346 var tgt = null; … … 418 418 var dpClass=dojo.getObject(this.dataProviderClass, false); 419 419 // is the store not specified? 420 var data; 420 421 if(this.store==null){ 421 422 // if user didn't specify either url or data, then assume there are option tags … … 424 425 var opts = this.domNode.getElementsByTagName("option"); 425 426 var ol = opts.length; 426 vardata=[];427 data=[]; 427 428 // go backwards to create the options list 428 429 // have to go backwards because we are removing the option nodes … … 448 449 this.parentClass=dojo.getObject(this.declaredClass, false).superclass; 449 450 this.parentClass.postCreate.apply(this, arguments); 451 452 // if there is no value set and there is an option list, 453 // set the value to the first value to be consistent with native Select 454 if(data&&data.length&&!this.getValue()){ 455 this.setDisplayedValue(data[0][this.searchAttr]); 456 } 450 457 451 458 // convert the arrow image from using style.background-image to the .src property (a11y) -
dijit/trunk/tests/form/test_FilteringSelect.html
r8926 r8927 254 254 <div>Value: <input id="value8" disabled></div> 255 255 <hr> 256 256 <p>FilteringSelect #9: No data</p> 257 <p>This FilteringSelect has no options to choose from. It should still load.</p> 258 <select name="state9" dojoType="dijit.form.FilteringSelect" style="width: 300px;" autocomplete="false"> 259 </select> 260 <br> 261 <hr> 257 262 <input type="submit"> 258 263 </form>