ExtJS2.2 expand() Combo but dont focus it

722 Views Asked by At

I'm working on an "old" application in ExtJS 2.2 and the method expand of Ext.form.ComboBox doesn't work in my case.

I just do

Ext.getCmp('adresse_field_ville').expand();

But nothing happends, even not a trace in console.

I'm sure to use the good object, because juste before I do

Ext.getCmp('adresse_field_ville').setValue('');

And it works.

By googling I found the method onTriggerClick. This method expands the combo and focuses it but i need to keep the focus on an other field.

Thanks

1

There are 1 best solutions below

0
On

Try focus do the expanding, add focus event in the listener

listeners: { focus: function(fld) { this.onTriggerClick(); } }

Execute the focus event: Ext.getCmp('adresse_field_ville').focus(false,100);