-
24 Feb 2010 9:54 AM #1
[CLOSED-656] ComboBox doesn't select an option on tab
[CLOSED-656] ComboBox doesn't select an option on tab
Hi,
the problem is that the ComboBox doesn't select a value if you select an item from the drop-down list and press the tab key. In earlier versions this was working. I'm not sure if this is wanted behavior or not.
In rev. 5850 the "tab" function of the KeyNav was changed from:
to:Code:"tab" : function(e){ this.onViewClick(false); return true; }
The ComboBox-config I used in both revisions:Code:"tab" : function(e){ this.collapse(); return true; }
Best regards,Code:{ xtype: 'combo', ... store: new Ext.data.SimpleStore({ fields: [ 'localized', 'value' ], data: [["Yes","yes"],["Maybe","maybe"],["No/Internal","no/internal"]] }), valueField: 'value', displayField: 'localized', triggerAction: 'all', forceSelection: true, mode: 'local' }
croaker
-
5 Mar 2010 9:30 PM #2
Is there a link to the bug tracking for this issue? I would like to know when it gets fixed. Until then I am going back to version 3.0.0.
-
5 Mar 2010 9:48 PM #3
I believe this is the same bug as issue #606, and has already been resolved in SVN:
http://www.sencha.com/forum/showthread.php?t=92466
Sencha Docs / Ext 3.x - ( Docs | Examples )
Learning Center / Saki's Examples (for 2.x) / HOWTO - ( Report Bugs | Post Proper Code )
-
6 Mar 2010 9:27 AM #4Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,659
- Vote Rating
- 14
Same issue, and it's one where some people want the selection on tab and others don't. The determining factor in 3.2 at the moment is forceSelection: true. In your example, if someone types 'y' and then tabs, what do you feel it should do?
-
1 May 2010 6:58 AM #5
If I have use UP/DOWN to select an entry from the list (like the original poster said), then I definitely always want to commit that value on tab.
I think all common GUI toolkits that I used so far (Java Swing, MS MFC, MS WPF and others behave like this).
If I tab out after just typing "y" then I want to leave that value intact and only show a validation error.
-
30 Jul 2010 6:41 AM #6
I agree 100% with Stephen.
When you press tab, the currently highlighted item in the list should be accepted as the desired value. This behavior is exhibited in every other major GUI development tool I've used.
Regardless, I didn't see anything in the docs for version 3.2.1 on the relatively simple fix for this issue:
Code:var combo = new Ext.form.ComboBox({ allowBlank: false, autoComplete: true, displayField: 'username', forceSelection: true, listeners: { afterrender: function(component) { component.keyNav.tab = function() { this.onViewClick(false); }; } }, mode: 'local', store: someComboStore, triggerAction: 'all', valueField: 'userId', width: 250 });
You found a bug! We've classified it as
a bug in our system.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.


Reply With Quote