View Full Version : [solved] Tabbing through form elements with ComboBox - Firefox
Hi ..
i'm using ext 1.1 and a form with ComboBoxes ... If you're in a collased ComboBox and you press [TAB], you would expect to focus the next form element. Right now, ComboBoxes are filtering [TAB]s with this:
"tab" : function(e){
this.onViewClick(false);
return true;
}
this is against expected behavior of a browser. You should add something like
"tab" : function(e){
if (this.isCollapsed()) {
this.focusNextFormElement();
} else {
this.onViewClick(false);
return true;
}
}
Benjamin
mystix
5 Aug 2007, 7:42 AM
8887
Well, i think this is definitely a bug (not a feature request, or anything else), because you intentionally break the default - and expected - behavior of the browser.
And this is something imho you shouldn't do.
Benjamin
mystix
5 Aug 2007, 8:03 AM
firstly, refer to point (i) of 8887 -- it mentions opinions. ;)
secondly, since you've dugged around the source a little, have you traced the execution path of that little code snippet all the way to completion to know what's going on? ~o)
[edit]
forgot the most important of them all...
have you even used the combobox in a form before concluding that it goes "against expected behavior of a browser"?
secondly, since you've dugged around the source a little, have you traced the execution path of that little code snippet all the way to completion to know what's going on? ~o)
No, I didn't trace everything to the last point in your code. I expect a framework to know what it is doing :-) But i know that is followed all the rules of a valid form (including setting tab index values for my form). And i know, that after i've added the ComboBox behavior, the tab order is not the same as before). Therefore the default and expected form behavior has been broken by ext - as far as I'm concerned.
But I agree, that you need to decide, what is a valid bug report and what isn't :-)
edit: and yes, i did read http://extjs.com/forum/showthread.php?t=8887 before posting .. :)
forgot the most important of them all...
have you even used the combobox in a form before concluding that it goes "against expected behavior of a browser"?
okay, you got me on that one.. i guess i need to be more specific .. I'm using a string-field with a ajax-autocomplete-feature .. it's technically a ComboBox, I agree that on a standard drop-down-box it would not be the standard/default behavior i'm talking about :)
mystix
5 Aug 2007, 8:17 AM
now that we've established that you're reporting a broken tabIndex order and not broken combobox tabbing, perhaps you'd like to post a test case as suggested by point (5) of the thread that you've read? ;)
[edit]
man we're both posting too quickly. :)
post a test case. remember to wrap it in
tags ;)
jack.slocum
5 Aug 2007, 8:27 AM
Just for the record, that code you posted already does filter whether or not the list is expanded. If you look further down, you will see where it is filtering doRelay which controls whether or not the key is even passed to the hander.
Hey ..
I'm trying to build a simple test-case for that, but i cant :-) It is working, after i extended your states-example with all of my options.. But still on my dialog, if i press [TAB], i do not move to the next element.. (at least not on FF2.0.0.5) .. I will keep trying to build a simple example..
Benjamin
mystix
5 Aug 2007, 7:53 PM
Hi Benjamin,
are you building a dynamic form inside your dialog?
if you're indeed building a dynamic form, you might want to take a look at the tabIndex (http://extjs.com/deploy/ext/docs/output/Ext.form.Field.html#config-tabIndex) config option for the Ext.form.Field (and all its subclasses).
thanks for all your replies.. after getting the problem again I've noticed, that it is a Firefox bug, where neither tab, nor return works anymore. After restarting the Firefox the tab-index is working as expected. Sorry for that ..
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.