#6197 closed defect (fixed)
[patch][ccla]ComboBox does not load item, when selecting a value with the keyboard
Reported by: | John Locke | Owned by: | wolfram |
---|---|---|---|
Priority: | high | Milestone: | 1.1 |
Component: | Dijit - Form | Version: | 1.1b1 |
Keywords: | Cc: | haysmark | |
Blocked By: | Blocking: |
Description
- Create a data store-backed ComboBox?.
- Select an item from the list by typing a value, then use the mouse to select an item in the list.
- Trigger a script, and attempt to get values from the store using code like the following:
var cb = dijit.byId('mycombobox'); var source = cb.store.getValue(cb.item, 'source');
Result: "source" is set to the value looked up in the data store associated with the selected item.
- Repeat the above, only this time in step 2 use the keyboard to select an item (use up/down arrows, enter, tab).
Result: cb.item evaluates to false, not able to access other data in the store item.
Tested on FF2/Linux, Dojo 1.1.0b3.
Attachments (2)
Change History (9)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Cc: | haysmark added |
---|---|
Milestone: | → 1.1 |
Owner: | set to wolfram |
This may be a regression from #4872. wolfram, can you check to see if moving
this.item = null; // #4872
from _onKeyPress() to the start of _startSearch() fixes both problems?
comment:3 Changed 13 years ago by
Hi,
The proposed fix works fine for me here. I moved the line above to line 529 in the current trunk, and no problems so far.
Thanks, John
comment:4 Changed 13 years ago by
Summary: | ComboBox does not load item, when selecting a value with the keyboard → [patch][ccla]ComboBox does not load item, when selecting a value with the keyboard |
---|
Changed 13 years ago by
Attachment: | 6197.patch added |
---|
waiting on verification from wolfram that #4872 is not regresed by this patch (refreshed)
comment:5 Changed 13 years ago by
looks good from my side. go ahead and commit it ... I added another fix, which reset the item properly when reset() is called, which was not the case until now. thx
Changed 13 years ago by
Attachment: | 6197andResetFix.patch added |
---|
comment:6 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:7 Changed 10 years ago by
Component: | Dijit → Dijit - Form |
---|
ok, so it may not be the keyboard selection causing the problem, so much as blurring the field.
When the field is selected and I click the button that triggers my script, ComboBox?.item is set. If I tab out of the field, ComboBox?.item gets cleared. I'd like to see this remain set after an item is selected...
FilteringSelect? has this same behavior.