#9537 closed defect (invalid)
ComboBox and FilteringSelect does not allow options with same value with different case to be selected onChange or onBlur
Reported by: | vmanchal | Owned by: | Douglas Hays |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | Dijit - Form | Version: | 1.0 |
Keywords: | case senstive options | Cc: | [email protected]… |
Blocked By: | Blocking: |
Description (last modified by )
The FilteringSelect? widget does not allow the user to select the same value with different case whether it's onChange or OnBlur?. For example, if the options are values "value1", "VALUE1", "value2", "value3"...so on. After user selects "value1", if the user selects "VALUE1" from the dropdown list, the value reverts back to "value1" again. This happens on all browser and all platforms.
######## code snippet from dijit.form.ComboBox? widget ##############
_onBlur: function(){ // summary: called magically when focus has shifted away from this widget and it's dropdown this._hasFocus=false; this._hasBeenBlurred = true; this._hideResultList(); this._arrowIdle(); // if the user clicks away from the textbox OR tabs away, set the value to the textbox value // #4617: if value is now more choices or previous choices, revert the value var newvalue=this.getDisplayedValue(); if(this._popupWidget&& (newvalue==this._popupWidget._messages["previousMessage"]||newvalue==this._popupWidget._messages["nextMessage"])){ this.setValue(this._lastValueReported, true); }else{ this.setDisplayedValue(newvalue); } },
########################################
If the else part is commented, everything works fine as expected.
Change History (4)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Component: | General → Dijit |
---|---|
Description: | modified (diff) |
Owner: | changed from anonymous to Douglas Hays |
comment:3 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Hi, I followed your test case and indeed reproduced your issue with FilteringSelect?.
Please refer to the ComboBox? API:
// ignoreCase: Boolean // Set true if the ComboBox/FilteringSelect should ignore case when matching possible items ignoreCase: true,
Set ignoreCase to false on all on ComboBoxes? and FilteringSelects? relying on case-sensitive data. Leave the else in your application as removing it may cause an unsafe loss of error checking.
comment:4 Changed 10 years ago by
Component: | Dijit → Dijit - Form |
---|
To be clear, the value selected on the onChange event is correct. It updates the textbox with the correct value. The problem is with onBlur on the textbox. It is onBlur, it reverts back to the previous value.